ohyicong / Google-Image-Scraper

A library to scrap google images
395 stars 150 forks source link

class names changed? #47

Open Gregoire-Mercier opened 1 year ago

Gregoire-Mercier commented 1 year ago

Hi! I love your code that I use from times to times since a long time. I just tried it today and it seems that Google class names changed. From the initial "python main.py" (of the last version) images tab is empty. I tryed to test possible class names from hand made example but I did not fix it. Do you have the same problem from your site? Best, Greg

drphero commented 1 year ago

Seem to have the same problem here. "Unable to get link"

ohyicong commented 1 year ago

Hi, have you downloaded the new source code? It should be patched.

Gregoire-Mercier commented 1 year ago

I just did it one more time (from scratch with git clone) and I get:

[INFO] Image path not found. Creating a new folder. [INFO] downloading chromedriver ver: 112.0.5615.49: https://chromedriver.storage.googleapis.com/112.0.5615.49/chromedriver_linux64.zip [INFO] lastest chromedriver downloaded [INFO] Gathering image links [INFO] Unable to get link [INFO] Unable to get link ...

ohyicong commented 1 year ago

It is working for my Chrome on version 112.0.5615.138. Maybe try updating your chrome?

Gregoire-Mercier commented 1 year ago

Nope sorry... I installed the latest Chrome google-chrome-stable_112.0.5615.165-1_amd64.deb

Then the chromedriver is the same and the broken link too:

python main.py [INFO] downloading chromedriver ver: 112.0.5615.49: https://chromedriver.storage.googleapis.com/112.0.5615.49/chromedriver_linux64.zip [INFO] lastest chromedriver downloaded [INFO] Gathering image links [INFO] Unable to get link [INFO] Unable to get link ...

ChristopherKurg commented 1 year ago

I have the same issue with "[INFO] Unable to get link"

Antz78 commented 1 year ago

Hi Ohyicong, same code + same Chrome = same issue for me + the automatic validation of the terms of use is no longer working. Can you help ?

Antz78 commented 1 year ago

When weeks ago, It used to make a really great work

utlaginn commented 1 year ago

can confirm. all up to date.

[INFO] Unable to get link

ohyicong commented 1 year ago

Hi, I couldn't replicate this bug on both Windows and Ubuntu machines. I suspect that Google search results may be tagging the image with a different class name for each language. I tested this on my Google search which is running on the English version.

Gregoire-Mercier commented 1 year ago

Hi, The last commit you did is fine. It seems that the location does not interfer in the class names, at least by using any line as driver.execute_cdp_cmd("Emulation.setGeolocationOverride", dict(latitude=1.290270, longitude=103.851959, accuracy=100)) Nevertheless it works fine for me now. Thanks! All the best.

utlaginn commented 1 year ago

Hi, it's working great again. Thank you, ohyicong!