Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working and no error message #44

Closed
zarveyy opened this issue Mar 13, 2023 · 12 comments
Closed

Not working and no error message #44

zarveyy opened this issue Mar 13, 2023 · 12 comments

Comments

@zarveyy
Copy link

zarveyy commented Mar 13, 2023

Followed the readme step by step but nothing happens when I launch the script in my terminal, the folders are created and then nothing.

Env : Ubuntu 20.04.5 LTS running on WSL

@pors
Copy link

pors commented Apr 2, 2023

Same here on Mac OS, python 3.10.9, got this output for each image iteration:

[INFO] Unable to get link

@M0rbidSarcasm
Copy link

Reference to Unable to get link #33

Try these packages and version
selenium==3.141.0
requests==2.25.1
pillow==9.0.1

Every second image we tried to download showed unable to get link, after updating the packages it went a bit smoother and faster. Only every 50 images or so now go into an unable to get link loop :)

@rodrigo-barraza
Copy link

Even with the packages recommended, I'm getting the [INFO] Unable to get link loop since yesterday. And I noticed starting yesterday, only around 50 images would only download, regardless of the query.

@rodrigo-barraza
Copy link

rodrigo-barraza commented Apr 7, 2023

Even with the packages recommended, I'm getting the [INFO] Unable to get link loop since yesterday. And I noticed starting yesterday, only around 50 images would only download, regardless of the query.

After doing a little experimentation, Google Images has changed how their elements are structured on results. After 50 or so images, they've inserted a "Related Searches" element, and after this, they now include an element that encompasses the next 50 images. After that, the "Related Searches" element reappears, and then another parent element holding the next 50 images appears, and so on. On top of this, they have changed the class name of the image element as well, hence why it doesn't download any longer.

@M0rbidSarcasm
Copy link

Okay so, what is the next step? Do we disable the automatic update of the chrome driver to use the latest, most stable chrome driver/version that doesn't use the "related image results" function? Or do we enable images to download from encrypted websites? Like Https? Cuz after also playing with the code and using 360 image search keys we also have 50% accurate downloads. Especially with the search keys being more than 1 word for example "Phillips coffee machine and grinder".

Please let me know because this has been driving me mad for months.

@ohyicong
Copy link
Owner

ohyicong commented Apr 8, 2023

Hi, seems like the class tag used to identify the image link has changed, which resulted in this issue. I'm working on a fix now, will update everyone soon.

@ohyicong
Copy link
Owner

ohyicong commented Apr 8, 2023

Patch has been released. It has been tested only on Windows OS, and may not work on others.

@rodrigo-barraza
Copy link

You're a life saver @ohyicong ! Thank you for your quick response time and amazing xpath skills. Let me know if there is anywhere I can go to buy you a coffee or whatever :)!

@M0rbidSarcasm
Copy link

@ohyicong our downloads are amazing now! No unable to get links, and the accuracy is amazing!!! Thank you so much, you genius!

@AmirSh15
Copy link

Thanks for your unwavering support, but I'm now facing another problem. Once I call the browser and approach Google, the 'Before you continue' pop-up window appears and won't let the remaining code run. Let me know if you know of any solution for it.

@ohyicong
Copy link
Owner

Hi @AmirSh15, this issue was highlighted by other users before, I wanted to fix it but I can't replicate the "pop-up" behavior on my computer. If you have a solution, I don't mind merging it into my repository. I will close this thread, as this is a separate issue. Thanks!

@AmirSh15
Copy link

Hi @ohyicong, I found the solution for the cookie pop-up window once google.com is called. It seems that in the new chrome version this window appears! You only need to add the below script after this line of code.

WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "W0wltc"))).click()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants