Describe the problem.
I'm attempting to scrape category pages and collect the image shown in the banner. The banner div is written as:
<div class="title-banner__right-image"></div>
In a separate stylesheet, the image is displayed with:
.title-banner__right { background-image: url(https://i.ebayimg.com/images/g/3GYAAOSwF3pfheiI/s-l1600.webp); }
I attempted to use an Element Attribute to pull this image, but style isn't working. I'm guessing that's because style isn't included in the HTML.
This didn't work:
- Type: Element Attribute
- Selector: div.title-banner__right-image
- Attribute name: style
Is there another way I can scrape a background-image from a div?
Url: https://www.ebay.com/e/ad/hanes-champ-50off-evtm-q4
Sitemap:
{"_id":"image-test","startUrl":["https://www.ebay.com/e/ad/hanes-champ-50off-evtm-q4"],"selectors":[{"id":"banner-image","type":"SelectorElementAttribute","parentSelectors":["_root"],"selector":"div.title-banner__right-image","multiple":false,"extractAttribute":"style","delay":0}]}