Extract url from style=background-image

Hello guys, I am trying to create a feed for this site: https://www.hablemosenbitsweb.com/podcast Everything is working fine except that I can’t get the images.

As you can see images are at:
<div style="background-image:url("[URL TO IMAGE IS HERE]")" class="div-block-44"></div>

I am trying to get the creator to extract the image using:
.div-block-44 @style

But that doesn’t seem to work.

Here is my try link:

Any help would be appreciated.


Hi there, unfortunately this won’t work at the moment. The @attr selector for extracting images expects the entire string to the be a URL. So you could use it for something like img @data-src but it won’t work well for style elements.

We’ll consider supporting URL extraction from style attributes, so it might be supported in the future.

Hey thanks a lot for the answer. If you are passing the whole selector to the parser you could add an user-togglable option to look for strings inside url() brackets. That way you wouldn’t affect current functionality which is working very well.

Thanks again.

We’ll definitely think about supporting in a future update. We’ve seen a few cases where the image URLs are in style attributes like here.