Code Monkey home page Code Monkey logo

Comments (12)

ohyicong avatar ohyicong commented on August 22, 2024 2

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.

from google-image-scraper.

ohyicong avatar ohyicong commented on August 22, 2024 2

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

from google-image-scraper.

M0rbidSarcasm avatar M0rbidSarcasm commented on August 22, 2024 1

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 :)

from google-image-scraper.

rodrigo-barraza avatar rodrigo-barraza commented on August 22, 2024 1

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 :)!

from google-image-scraper.

M0rbidSarcasm avatar M0rbidSarcasm commented on August 22, 2024 1

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

from google-image-scraper.

ohyicong avatar ohyicong commented on August 22, 2024 1

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!

from google-image-scraper.

pors avatar pors commented on August 22, 2024

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

[INFO] Unable to get link

from google-image-scraper.

rodrigo-barraza avatar rodrigo-barraza commented on August 22, 2024

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.

from google-image-scraper.

rodrigo-barraza avatar rodrigo-barraza commented on August 22, 2024

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.

from google-image-scraper.

M0rbidSarcasm avatar M0rbidSarcasm commented on August 22, 2024

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.

from google-image-scraper.

AmirSh15 avatar AmirSh15 commented on August 22, 2024

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.

from google-image-scraper.

AmirSh15 avatar AmirSh15 commented on August 22, 2024

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()

from google-image-scraper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.