I have been trying to get information from this website https://www.leadhome.co.za/property/poortview-ah/roodepoort/lh-95810/magnificent-masterpiece-in-poortview- and I am having issues with getting all the images of the property; more specifically the URL
this is how the class looks like:
<div class="lazy-image listing-slider-carousel-item lazy-image-loaded">
<div class="lazy-image-background" style="background-image: url("https://s3-eu-west-1.amazonaws.com/leadhome-listing-photos/025c90ab-9c87-47d5-b11c-1cfbce3f67f2-md.jpg");"></div>
</div>
What I have so far:
for item in response.xpath('//div[@class="lazy-image-background"]/*[starts-with(@style,"background-image")]/@style').getall():
yield {"image_link":item}
But unfortunately this is empty. Any tips on what I'm doing wrong? Thank you!


