I'm trying to scrape images from google images using the google_images_download library by using it from another Python file. I previously used the code below about a month ago and it was fine but today morning it threw exception errors and then finally gave me the error
Unfortunately all 100 could not be downloaded because some images were not downloadable
I checked the documentation and GIT repo and noticed there were changes made 15 days ago, is there something I'm missing or is the library bugged? Also if there are better methods than this, kindly point me in the right direction. My code is below:
from google_images_download import google_images_download
response = google_images_download.googleimagesdownload()
arguments = {"keywords":"potato harvesting","limit":100,"format":"jpg","print_urls":True}
paths = response.download(arguments)
I figured a way to fix the error,through using the CLI instead of a Jupyter Notebook file. I will list down the steps:
python setup.py install
, I manually had to uninstall them, luckily I found python setup.py uninstall and the procedure is layed out there on how to manually uninstall (highest voted answer).:git clone https.//github.com/Joeclinton1/google-images-download.git
via the CLI and then opened the files by cd google-images-download
.pip install.
NOT python setup.py install
.This worked for me and hopefully will work for you. Note: I cloned the repo in a new folder on the desktop for ease. The downloaded images will be in the same repo folder ie google-images-download under the Download file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.