Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 61 additions & 5 deletions config/zurich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ scrapers:
- name: "title"
location:
selector: ".text-block-21"
- name: "imageUrl"
type: "url"
location:
selector: "img"
attr: "src"
- name: "comment"
location:
selector: ".text-block-28"
Expand Down Expand Up @@ -157,6 +162,12 @@ scrapers:
selector: h3.h3
all_nodes: true
separator: ", "
- name: imageUrl

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the resulting image url seems a bit weird and doesn't work if you just browse that link directly, e.g.

  "imageUrl": "https://www.moods.ch/data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHBwgHBgoICAgLCgoLDhgUDQ0NGhEOFRUVIyEZGiIVFiEaHysjGh0oHRYWJDUlKC0vMjIyGSI4PTcwPCsxMi8BCgsLDg0OHQUFFS8dFhwvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vL//AABEIABEAGAMBIgACEQEDEQH/xAAbAAACAQUAAAAAAAAAAAAAAAAABQYBAgMEB//EACQQAAEDAgQHAAAAAAAAAAAAAAIAAQMEBRExQXEGEiEyNDVC/8QAFwEAAwEAAAAAAAAAAAAAAAAAAQIDAP/EABcRAAMBAAAAAAAAAAAAAAAAAAABAgP/2gAMAwEAAhEDEQA/AHdHXNDCRY5JRBxUL3toWf6W21GbxEDaso7TcNzjfhm64cyNojnZ0y41pFQAbasqrFWU5jbYxdsmQspHdiyHuVsPsB3QhNZHMklw8MdkIQihmf/Z",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right. Goskyr doesn't recognize the data: protocol as a URL, so it prepends the base URL. This can be avoided by making it a text field.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed by making it a text field.

type: text
location:
- selector: div > div.w-full > span > span.hidden > span > div > img:nth-child(2)
attr: src
can_be_empty: true
- name: url
type: url
location:
Expand Down Expand Up @@ -324,6 +335,13 @@ scrapers:
type: "url"
location:
selector: ".event-link"
- name: "imageUrl"
type: "url"
on_subpage: "url"
location:
selector: "figure.event-media-image > img"
attr: src
can_be_empty: true
- name: "date"
type: "date"
on_subpage: "url"
Expand Down Expand Up @@ -385,6 +403,13 @@ scrapers:
type: "url"
location:
selector: ".desktop-linkoverlay"
- name: "imageUrl"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the resulting url seems to be the Tonhalle logo, not the event's image, e.g.

  "imageUrl": "https://www.tonhalle-orchester.ch/site/templates/images/TonhalleZurich_Logo_RGB_Schwarz.png",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed by fetching the banner image from the event page.

type: "url"
on_subpage: url
location:
selector: div.pagetitle-header > img
attr: src
default: "https://www.tonhalle-orchester.ch/site/templates/images/TonhalleZurich_Logo_RGB_Schwarz.png"
- name: "date"
type: "date"
components:
Expand Down Expand Up @@ -553,6 +578,11 @@ scrapers:
type: "url"
location:
selector: ".col-sm-8 h2 a"
- name: "imageUrl"
type: "url"
location:
selector: "img.img-responsive"
attr: "src"
- name: "comment"
on_subpage: "url"
can_be_empty: true
Expand Down Expand Up @@ -802,6 +832,13 @@ scrapers:
type: "url"
location:
selector: "a"
- name: "imageUrl"
on_subpage: "url"
type: "url"
location:
selector: "div.image > img"
attr: "src"
can_be_empty: true
- name: "date"
type: "date"
components:
Expand Down Expand Up @@ -1348,7 +1385,7 @@ scrapers:

- name: AlteKaserne
url: https://www.altekaserne.com/events
item: div.row.party > div.col-sm-8.col-lg-9 > div.text-block
item: div.row.party
fields:
- name: "type"
value: "concert"
Expand All @@ -1363,8 +1400,14 @@ scrapers:
- name: url
type: url
location:
- selector: a
- selector: div.text-block > a
attr: href
- name: imageUrl
type: url
location:
- selector: div.img-block > a > img
attr: src
can_be_empty: true
- name: date
type: date
components:
Expand All @@ -1373,7 +1416,7 @@ scrapers:
month: true
year: true
location:
selector: a > div.datum
selector: div.text-block > a > div.datum
layout: ["Mon. 2. Jan. 2006"]
- covers:
time: true
Expand All @@ -1388,11 +1431,11 @@ scrapers:
- name: title
type: text
location:
- selector: a > h3.name
- selector: div.text-block > a > h3.name
- name: comment
type: text
location:
- selector: p
- selector: div.text-block > p

- name: MaagMoments
url: https://www.maag-moments.ch/maag/de/events.html?event_category=konzerte
Expand Down Expand Up @@ -1566,6 +1609,9 @@ scrapers:
value: https://baramegge.ch/programm/konzerte/
- name: url
value: https://baramegge.ch/programm/konzerte/
- name: imageUrl
type: url
value: https://baramegge.ch/wp-content/uploads/yootheme/cache/86/BaE_Logo_RGB-860b4f19.webp
- name: location
value: Bar Am Egge
- name: comment
Expand Down Expand Up @@ -1735,6 +1781,13 @@ scrapers:
location:
- selector: div.heading-container:nth-child(2) > h2.heading > a
attr: href
- name: imageUrl
type: url
location:
- selector: picture > img
attr: data-srcset
regex_extract:
exp : "[^, ]+"
- name: date
type: date
components:
Expand Down Expand Up @@ -2624,6 +2677,9 @@ scrapers:
value: concert
- name: sourceUrl
value: https://www.galotti.ch/events/
- name: imageUrl
value: https://p.kagi.com/proxy/01_logo_galotti_schwarz-weiss.240x0.png
type: url
- name: title
type: text
location:
Expand Down