diff --git a/config.yml b/config.yml index da23ca7..e5a450b 100644 --- a/config.yml +++ b/config.yml @@ -103,8 +103,6 @@ crawlers: - name: Moods type: concert url: "https://www.moods.club/en/?a=1" - # url: "https://www.moods.club/en/program/event/11365/zurich-jazz-orchestra-feat-barbara-dennerlein.html" - # url: "https://www.moods.club/en/program/event/11505/shems-bendali-quintet.html" city: "Zurich" event: ".event" fields: @@ -124,8 +122,31 @@ crawlers: loc: ".date .month_name" layout: "Jan" time: - loc: ".time" + loc: ".right .time" layout: "Start: 15:04" + node_index: -1 # -1 means the last node location: "Europe/Berlin" language: "en_US" + + - name: ImportExport + type: concert + url: "https://import-export.cc/" + city: "Munich" + event: ".events a" + fields: + url: + loc: "" + on_subpage: ["date"] + title: + - ".io-title" + date: + day_month_year: + loc: ".event .event-info .io-big" + layout: "2.1.2006" + node_index: 0 + time: + loc: ".event .event-info .io-big" + node_index: 3 # We need this in case there are multiple nodes that would be selected with the given loc + layout: "Einlass: 15.04" + location: "Europe/Berlin" \ No newline at end of file diff --git a/html_pages/import_export_event.html b/html_pages/import_export_event.html new file mode 100644 index 0000000..fe6f096 --- /dev/null +++ b/html_pages/import_export_event.html @@ -0,0 +1,6907 @@ + + + + + + + + + + + + Psychedelic Porn Funk Experience – The Magical Mystery Show | Import Export + + + + + + + + + + + + + + + + + + + + + + + + +
+

Unser Mittagstisch hat geschlossen. Wir hoffen ihn bald wieder öffnen zu können. Unser + Mittagstisch hat geschlossen. Wir hoffen ihn bald wieder öffnen zu können. Unser Mittagstisch hat + geschlossen. Wir hoffen ihn bald wieder öffnen zu können. Unser Mittagstisch hat geschlossen. Wir hoffen ihn + bald wieder öffnen zu können. Unser Mittagstisch hat geschlossen. Wir hoffen ihn bald wieder öffnen zu + können. Unser Mittagstisch hat geschlossen. Wir hoffen ihn bald wieder öffnen zu können. Unser Mittagstisch + hat geschlossen. Wir hoffen ihn bald wieder öffnen zu können. Unser Mittagstisch hat geschlossen. Wir hoffen + ihn bald wieder öffnen zu können. Unser Mittagstisch hat geschlossen. Wir hoffen ihn bald wieder öffnen zu + können. Unser Mittagstisch hat geschlossen. Wir hoffen ihn bald wieder öffnen zu können.

+
+
+
+
+ +
+
+ +

Psychedelic Porn Funk Experience – The Magical Mystery Show

+
+
+

Fr. 17.12.21

+

Konzert + Film

+
+
+

Einlass: 19.00

+

Beginn: 20.00

+
+
+
+ +
+

Psychedelic Porn Funk Experience – The Magical Mystery Show

+

Presented by Behind the Green Door x Import Export
+ Permakultur Schallplatten.

+

Magical live performance
+ Mystery live band
+ Kreuzer Lichtmaschine

+

The Porn Funk is dying under the restrictions, but it will not just vanish in defeat. Instead we + nourish the flame that brought us through these dark times with a mystical rite.
+ This ceremony must be held in secret.
+ It is not for the faint hearted as reality will obey bizarre and even celestial laws during the time + of your stay.
+ Come by and be part of 50 chosen ones for the ceremony, in a mass, in a circle, in a ritual we + create together in the last days of this year.
+ But! …
+ If you believe in the foundations of reality, better stay home.

+
+

Es gilt die 2G+. Limitiert auf 50 Gäste
+ Die Gastronomie hat derzeit eine Sperrstunde um 22.00: letzte Runde um 21.45. Weitere Infos zu den + Einlassbedingungen bezüglich Corona findet ihr in unseren FAQs.

+
+
+
+ +

Vorverkauf

+
+

Abendkasse

+
+
+

7 €

+

7 - 15 €

+
+
+
+
+ +
+ + + + \ No newline at end of file diff --git a/html_pages/moods_event.html b/html_pages/moods_event.html index 03aaea0..73ed40c 100644 --- a/html_pages/moods_event.html +++ b/html_pages/moods_event.html @@ -400,8 +400,10 @@

​​​​​​​NEW MEASURES

13 Mo Dec - Doors: 19:30Start: - 20:30Price + Doors: 19:30 + Start: 20:30 + Price 30.- CHF

Tickets

diff --git a/main.go b/main.go index b84295f..2d15244 100644 --- a/main.go +++ b/main.go @@ -239,6 +239,7 @@ func extractField(item string, s *goquery.Selection, crawler *Crawler, event *Ev dateTimeString = s.Find(crawler.Fields.Date.DayMonthYearTime.Loc).Text() layout = crawler.Fields.Date.DayMonthYearTime.Layout } else { + //if crawler.Fields.Date.DayMonthYear. var dayMonthString, dayMonthStringLayout string if crawler.Fields.Date.DayMonth.Loc != "" { dayMonthString = s.Find(crawler.Fields.Date.DayMonth.Loc).Text() @@ -258,7 +259,13 @@ func extractField(item string, s *goquery.Selection, crawler *Crawler, event *Ev // Normally, there should be only one occurence of the time. However, on the // Moods website there are two of which we only want the last. Let's see how // well this works for other websites. - timeString = s.Find(crawler.Fields.Date.Time.Loc).Last().Text() + + //timeString = s.Find(crawler.Fields.Date.Time.Loc).Last().Text() + //timeString = s.Find(crawler.Fields.Date.Time.Loc).First().Text() + timeStringSelection := s.Find(crawler.Fields.Date.Time.Loc) + fmt.Println(event.URL) + fmt.Println(timeStringSelection.Text()) + timeString = timeStringSelection.Get(crawler.Fields.Date.Time.NodeIndex).FirstChild.Data timeStringLayout = crawler.Fields.Date.Time.Layout } @@ -369,6 +376,12 @@ type Config struct { Crawlers []Crawler `yaml:"crawlers"` } +type Locator struct { + Loc string `yaml:"loc"` + Layout string `yaml:"layout"` + NodeIndex int `yaml:"node_index"` +} + type Crawler struct { Name string `yaml:"name"` Type string `yaml:"type"` @@ -383,28 +396,14 @@ type Crawler struct { OnSubpage []string `yaml:"on_subpage"` } `yaml:"url"` Date struct { - Day struct { - Loc string `yaml:"loc"` - Layout string `yaml:"layout"` - } `yaml:"day"` - Month struct { - Loc string `yaml:"loc"` - Layout string `yaml:"layout"` - } `yaml:"month"` - DayMonth struct { - Loc string `yaml:"loc"` - Layout string `yaml:"layout"` - } `yaml:"day_month"` - DayMonthYearTime struct { - Loc string `yaml:"loc"` - Layout string `yaml:"layout"` - } `yaml:"day_month_year_time"` - Time struct { - Loc string `yaml:"loc"` - Layout string `yaml:"layout"` - } `yaml:"time"` - Location string `yaml:"location"` - Language string `yaml:"language"` + Day Locator `yaml:"day"` + Month Locator `yaml:"month"` + DayMonth Locator `yaml:"day_month"` + DayMonthYear Locator `yaml:"day_month_year` + DayMonthYearTime Locator `yaml:"day_month_year_time"` + Time Locator `yaml:"time"` + Location string `yaml:"location"` + Language string `yaml:"language"` } `yaml:"date"` Comment []string `yaml:"comment"` } `yaml:"fields"`