Skip to content

fetch image from style: background-image #724

Closed Answered by gildesmarais
haayman asked this question in Q&A
Discussion options

You must be logged in to vote

Hej / Moin,
sorry took me a while to get back.

Little issues with your config, here's the corrected one:

channel:
  url: https://www.salland1.nl/category/deventer/
  title: Salland1 Deventer
  description: Nieuws uit Deventer
selectors:
  items:
    selector: '.td-cpt-post'
  title:
    selector: 'a[title]'
    extractor: attribute
    attribute: title
  url:
    selector: 'a'
    extractor: href
  enclosure:
    selector: "span.entry-thumb"
    extractor: "attribute"
    attribute: "style"
    post_process:
      - name: gsub
        pattern: "background-image: url\\([']?"
        replacement: ""
      - name: gsub
        pattern: "[']?\\)"
        replacement: ""

Their markup seems sk…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by haayman
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants