A basic script that downloads images from Google, based on a search term.
- Install Selenium WebDriver for Python
- Choose whether you want to go headless or not, and toggle the comment on line 14 accordingly.
- Run the Python code and type your search term in the Terminal window.
- The script will create a new folder, perform the search, and download the images. The number of images downloaded depends on the number of search results, but it should give you around 600+ images consistently, for use in ML training datasets etc.
- Add the ability to download higher resolution images
- Add the ability to choose how many images you want to download
- Add some error handling / Selenium assertions to make things a bit more robust