google-images-download
google-images-download copied to clipboard
Never getting any images
I just cannot get this module to work, it always returns 0 results. Here is a screenshot from the CLI
And here is an example where it is used inside a function:
def changewallpaper(keyword):
resp = google_images_download.googleimagesdownload() # init class
args = {
"keywords": f"{keyword} wallpaper",
"limit": 1,
"size": "large",
"print_urls": True
} #pass args
download_folder = fr"{os.getcwd()}\downloads\{keyword} wallpaper"
paths = resp.download(args) #save downloaded image paths to paths var
print(paths) # printing paths```
Having the same problem. Has some change in Google's api broken it?
There is no API here, its web scraping. But yeah it got broken.
Also broken for me:
Item no.: 1 --> Item name = Trump Face
Evaluating...
Getting you a lot of images. This may take a few moments...
Reached end of Page.
Traceback (most recent call last):
File "/Users/[username]/.pyenv/versions/3.8.2/bin/googleimagesdownload", line 11, in
File "/Users/[username]/.pyenv/versions/3.8.2/lib/python3.8/site-packages/google_images_download/google_images_download.py", line 1072, in main paths,errors = response.download(arguments) #wrapping response in a variable just for consistency
File "/Users/[username]/.pyenv/versions/3.8.2/lib/python3.8/site-packages/google_images_download/google_images_download.py", line 900, in download paths, errors = self.download_executor(arguments)
File "/Users/[username]/.pyenv/versions/3.8.2/lib/python3.8/site-packages/google_images_download/google_images_download.py", line 1020, in download_executor images, tabs = self.download_extended_page(url,arguments['chromedriver'])
File "/Users/[username]/.pyenv/versions/3.8.2/lib/python3.8/site-packages/google_images_download/google_images_download.py", line 265, in download_extended_page images = self._image_objects_from_pack(self._extract_data_pack_extended(source))
File "/Users/[username]/.pyenv/versions/3.8.2/lib/python3.8/site-packages/google_images_download/google_images_download.py", line 148, in _image_objects_from_pack image_objects = json.loads(data)[31][0][12][2]
File "/Users/[username]/.pyenv/versions/3.8.2/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s)
File "/Users/[username]/.pyenv/versions/3.8.2/lib/python3.8/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1897 column 1 (char 133213)
Same to me, not solved yet.
+1
+2
Broken for me too
Could not open URL. Please check your internet connection and/or ssl settings
If you are using proxy, make sure your proxy settings is configured correctly
The patched version here doesn't work either
+
Broken for me too
Could not open URL. Please check your internet connection and/or ssl settings If you are using proxy, make sure your proxy settings is configured correctly
That error is what I am getting in this fork as well
I have fixed this error in the latest commit of patch-1
To be more specific I have fixed the error below:
Could not open URL. Please check your internet connection and/or ssl settings
If you are using proxy, make sure your proxy settings is configured correctly
The other error (the first one mentioned) is what my patch was created to solve, and it still does.
Line 717 it searches for "rg_meta notranslate" in the returned page data which does not exist anymore
Same issue
I faced the same problem but simply added sudo and this solved the problem for me (Colab)
I faced the same problem but simply added sudo and this solved the problem for me (Colab)
Can you please share the modified code regarding the google colab?
I maybe find a better choice for normal user, a GUI version images download tool to pull images from Google, Bing and Baidu,https://github.com/sczhengyabin/Image-Downloader, and this working well for me.
That's not necessarily a better choice. It is very processor intensive. The GUI is a nice touch. But I wasn't able to run it on a terminal-only machine. Of course if this one doesn't work at all then maybe yes.
On Sun, 13 Sep 2020, 13:59 yellowpuppy, [email protected] wrote:
I find a better choose, https://github.com/sczhengyabin/Image-Downloader http://url, and this working well for me.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hardikvasa/google-images-download/issues/325#issuecomment-691635315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENQRYJDLN4OHPJZX7VOIA3SFR7IPANCNFSM4QOP3CWA .
He means to run the command with sudo.
On Sun, 13 Sep 2020, 13:55 satyamsharma, [email protected] wrote:
I faced the same problem but simply added sudo and this solved the problem for me (Colab)
Can you please share the modified code regarding the google colab?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hardikvasa/google-images-download/issues/325#issuecomment-691634692, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENQRYMMCP2FL3QMRWN2JGLSFR6YXANCNFSM4QOP3CWA .
I faced the same problem but simply added sudo and this solved the problem for me (Colab)
Can you please share the modified code regarding the google colab?
https://colab.research.google.com/drive/1RlHZWi4M7jZIaGjsqxIQokqrIFCTy5Hi?usp=sharing
I'm facing the same problem. Does anyone have solution for this?
Same issue. Has the front end of Google Images changed?
@k0a8t1o6 @hoangphuc1998 My patch-1 still works and fixes this issue, install it by running the below code in the cmd
git clone https://github.com/Joeclinton1/google-images-download.git cd google-images-download && python setup.py install
I still have the original and when I run to get your patch it was a success but I still get the same error
nvm I got it but where do the images download
@umustbeloggedintododat you need to specify a directory, with the argument output_directory, if not specified it will output to your downloads folder.
I maybe find a better choice for normal user, a GUI version images download tool to pull images from Google, Bing and Baidu,https://github.com/sczhengyabin/Image-Downloader, and this working well for me.
You may not. This is command-line or run as a module (both actually), ... if we're looking for a Python module, then we need that, not a gui.
uninstall the pip package first
pip uninstall google_images_download
I still have the original and when I run to get your patch it was a success but I still get the same error
@Joeclinton1 I'm getting this error every time, even with basic arguments. Am I doing something fundamentally wrong? Cheers!
Evaluating... str() takes at most 1 argument (2 given) Image objects data unpacking failed. Please leave a comment with the above error at https://github.com/hardikvasa/google-images-download/pull/298
@jamiemonksuk That error probably arises from this line in the code:
object_raw = str(page[start_object:end_object])
I'm not getting any error, so maybe you don't have the current version. It's very unlikely to be due to any arguments you've given.
Hi everyone, while i try download similar images with related image URL i got this error.