Skip to content
Advertisement

Scrapy spider: Download all images from img src

I scraped some links from a website and I’m using scrapy spider for scraping purpose.

JavaScript

But I got none type value. Just I am any number of image link of li. I download via loop.

This is my HTML code

JavaScript

I just want to get all link inside li like this

JavaScript

Advertisement

Answer

Try this, to extract the all image use extract() (its return list) instead of extract_first()(return first item) method.

JavaScript

Edit

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement