Code to mass download images from Google Images using JavaScript Console Window and python script.
Steps to perform:
- Query your intended Google search
- Scroll down through images until they become unrelated to your query or until you've passed enough images for your dataset
- Right click and hit "Inspect" and then navigate to "Console" tab
- Enter the lines from console.js into the console window and run them
- Move urls.txt from Downloads folder to this folder
- Run follwing two python commands as follows:
pip install -r requirements.txt
python download_images.py --urls urls.txt --output images
You should now have all your images inside your images folder!
Copyright (c) 2021 Ashish Kumar
Ashish Kumar
Made with ❤️ in India