Added an imageUrl to all functional scrapers in Zurich#484
Conversation
I also created issues for the non-functional ones, at least most of them
jakopako
left a comment
There was a problem hiding this comment.
Looks good, thanks for the contribution! I just made two comments, where it looks like resulting image URLs are not the correct ones.
| selector: h3.h3 | ||
| all_nodes: true | ||
| separator: ", " | ||
| - name: imageUrl |
There was a problem hiding this comment.
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",
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Addressed by making it a text field.
| type: "url" | ||
| location: | ||
| selector: ".desktop-linkoverlay" | ||
| - name: "imageUrl" |
There was a problem hiding this comment.
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",
There was a problem hiding this comment.
Addressed by fetching the banner image from the event page.
For Moods the fix was to change the type to text, as goskyr doesn't recognize the URL protocol "data". For Tonhalle we're now getting the image used as the banner on the event page, whereas I had lazily settled for the logo.
I also created issues for the non-functional ones, at least most of them