filmov
tv
Python Selenium Google Image Scraper Example

Показать описание
The example is performing queries for ['minecraft', 'minecraft pig'].
The beautiful soup method to scrape Google Image search results is limited to ~100 images. This is not good enough when trying to build an image repository. To avoid the ~100 image limit we use Selenium to simulate a scrolling user (using javascript to load the rest of the images). I have seen queries produce 800+ images at a time. The code sample I have provided is far from perfect but I thought I would share a working example! Hope anyone will be able to leverage this example.
The beautiful soup method to scrape Google Image search results is limited to ~100 images. This is not good enough when trying to build an image repository. To avoid the ~100 image limit we use Selenium to simulate a scrolling user (using javascript to load the rest of the images). I have seen queries produce 800+ images at a time. The code sample I have provided is far from perfect but I thought I would share a working example! Hope anyone will be able to leverage this example.