google-images-download icon indicating copy to clipboard operation
google-images-download copied to clipboard

Never getting any images

Open maracko opened this issue 3 years ago • 31 comments

I just cannot get this module to work, it always returns 0 results. Here is a screenshot from the CLI

image

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```

maracko avatar Aug 28 '20 20:08 maracko

Having the same problem. Has some change in Google's api broken it?

yoctometric avatar Aug 28 '20 23:08 yoctometric

There is no API here, its web scraping. But yeah it got broken.

maracko avatar Aug 29 '20 01:08 maracko

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 load_entry_point('google-images-download==2.8.0', 'console_scripts', 'googleimagesdownload')()

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)

protrolium avatar Aug 30 '20 18:08 protrolium

Same to me, not solved yet.

qiyang77 avatar Aug 31 '20 12:08 qiyang77

+1

nvnnghia avatar Sep 02 '20 01:09 nvnnghia

+2

yogesch avatar Sep 03 '20 05:09 yogesch

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

eyjho avatar Sep 03 '20 09:09 eyjho

The patched version here doesn't work either

yogesch avatar Sep 03 '20 15:09 yogesch

+

pickdani avatar Sep 05 '20 16:09 pickdani

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

maracko avatar Sep 06 '20 10:09 maracko

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.

Joeclinton1 avatar Sep 06 '20 15:09 Joeclinton1

Line 717 it searches for "rg_meta notranslate" in the returned page data which does not exist anymore

dmitryponv avatar Sep 07 '20 03:09 dmitryponv

Same issue

610yilingliu avatar Sep 07 '20 05:09 610yilingliu

I faced the same problem but simply added sudo and this solved the problem for me (Colab)

BigDanTheOne avatar Sep 08 '20 18:09 BigDanTheOne

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?

amrahsmaytas avatar Sep 13 '20 08:09 amrahsmaytas

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.

qiyang77 avatar Sep 13 '20 08:09 qiyang77

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 .

yogesch avatar Sep 13 '20 09:09 yogesch

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 .

yogesch avatar Sep 13 '20 09:09 yogesch

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

BigDanTheOne avatar Sep 13 '20 11:09 BigDanTheOne

I'm facing the same problem. Does anyone have solution for this?

hoangphuc1998 avatar Sep 18 '20 02:09 hoangphuc1998

Same issue. Has the front end of Google Images changed?

k0a8t1o6 avatar Sep 22 '20 06:09 k0a8t1o6

@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

Joeclinton1 avatar Sep 22 '20 12:09 Joeclinton1

I still have the original and when I run to get your patch it was a success but I still get the same error

umustbeloggedintododat avatar Sep 23 '20 19:09 umustbeloggedintododat

nvm I got it but where do the images download

umustbeloggedintododat avatar Sep 23 '20 19:09 umustbeloggedintododat

@umustbeloggedintododat you need to specify a directory, with the argument output_directory, if not specified it will output to your downloads folder.

Joeclinton1 avatar Sep 23 '20 21:09 Joeclinton1

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.

cooperdk avatar Oct 09 '20 00:10 cooperdk

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

vool avatar Oct 09 '20 22:10 vool

@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 avatar Oct 15 '20 05:10 jamiemonksuk

@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.

Joeclinton1 avatar Oct 16 '20 14:10 Joeclinton1

Hi everyone, while i try download similar images with related image URL i got this error. google-downloads-error1

kaloomte avatar Mar 12 '21 19:03 kaloomte