Python Script for Bulk Google Images Download(GitHub) to Disk
Summary
Google Images Download Project: This command-line Python utility searches Google Images for specific keywords or phrases and has the option to download the resulting images to your local machine. It's a self-contained, ready-to-use program that doesn't require any external dependencies for downloads of up to 100 images per keyword. For downloads exceeding 100 images, you'll need to installSelenium
and chromedriver
. See the troubleshooting section for details.
Compatibility
The program works seamlessly with both Python 2.x and 3.x versions, although 3.x is recommended. It's a plug-and-play solution that requires no modifications to the original file. All you need to do is provide the necessary parameters via the command line.Installation
You can use one of the below methods to download and use this repository.Install using pip
$ pip install google_images_download
Manually install using CLI
$ git clone https://github.com/hardikvasa/google-images-download.git $ cd google-images-download && sudo python setup.py install
Manually install using UI
Go to the repo on github ==> Click on ‘Clone or Download’ ==> Click on ‘Download ZIP’ and save it on your local disk.1. To download images (less than 100) using Google-Images-Download on a Mac: Open the Terminal app and run the following commands:
cd ~/Downloads googleimagesdownload -k "keyword" -l 20
-k
: stands for "keyword" (can use either Chinese or English keywords)
-l
: stands for "limit," which restricts the number of images to download
The downloaded images will be stored under ~/Downloads/downloads/{keyword}
. The Google Images Download program will create a sub-directory named after your search keyword to store the downloaded images.
2. To download images (more than 100) using Google-Images-Download on a Mac:
Open the Terminal app and run the following command:
googleimagesdownload -k "keyword" -l 200If you set the image count to exceed 100, the program will require
Selenium
and chromedriver
to function.
Selenium is automatically installed when you install the Google Images Download script.
You just need to download Chromedriver (choose the version suitable for your operating system). After downloading, unzip the single file from the package and place it in the ~/Downloads directory. Then run:googleimagesdownload -k "keyword" -l 200 --chromedriver="./chromedriver"The
--chromedriver
parameter specifies the path to chromedriver for the Google Images Download script.
Another GitHub Project: MAIGRET
Comments
Post a Comment