A simple tool to scrape google images by simply specifying queries
git clone https://github.com/gigatesseract/GimageScrape.git
- Install virtualenv (recommended)
pip install vitualenv
- Create virtual environment
virtualenv env
- Activate the virtual environment
source env/bin/activate
(You can deactivate it bydeactivate
) - Install requirements.
pip install -r requirements.txt
- Populate to_search.txt with your search queries. Make sure each query is in a new line. See to_search.txt for more details. Supports space separated queries.
cd googleScraper
- In the settings.py file, add the following line:
IMAGES_STORE = "path/to/valid/dir"
where the value is a path to any valid directory cd ..
scrapy crawl search
Sit back and relax. A folder called images will be created in the valid directory as mentioned in the IMAGES_STORE
in settings.py
and each searh query will create a new folder inside it and populate it with 20 images.