https://github.com/elsehow/google-image-search-scraper
do a google image search and download the images
https://github.com/elsehow/google-image-search-scraper
Last synced: 4 months ago
JSON representation
do a google image search and download the images
- Host: GitHub
- URL: https://github.com/elsehow/google-image-search-scraper
- Owner: elsehow
- Created: 2016-11-04T23:11:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T16:00:34.000Z (over 8 years ago)
- Last Synced: 2025-04-11T21:48:04.749Z (about 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 22
- Watchers: 5
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# google image search scraper
## install
```sh
pip install --upgrade google-api-python-client
pip install requests
```
## use
`python scrape.py --query="cute pandas" --n=100`
Will get the first 100 google image results for "cute pandas" in a directory `cute pandas/[time of query]/`. That directory will contain a file `query-results.json` with metadata, along with 100 cute panda images, named by result index + filename
You'll also need a file in this directory called `keys.json` with the format
```json
{
"developerKey": "your google developer key",
"cx": "you google custom search id - cse.google.com/cse/manage/all"
}
```