Downloading Bears using DuckDuckGo returns 0 images

Hi,

Am trying to download all the 3 types (grizzly,black,teddy) of Bear images into path, using DuckDuckGo.

And the code runs fine without any errors.
2021-11-02_12-42

But when I try to confirm the same - it seems no images were downloaded.
2021-11-02_12-42

Can anyone please guide where am going wrong!!
Truly appreciate the help!!

Thanx!

Not addressing the problem you are having but I found this post quite helpful if you are open to trying a different method for downloading the images - Alternative to bing image search

Hey Bijil,

Thank you so much for the quick help.

Tried it out, along with many other suggestions posted in the forums.

And after many failed trials, one solution which worked was :
“To move the for loop out of the if condition” - which was suggested by @mrfabulous1

Also, to my surprise , after doing so not only does the new code work fine, but the previous code (which I posted y’day) works fine too.

Makes me go crazy, as to what made it not work in the 1st place y’day!! :exploding_head:

Anyways, thanx again mate!!

2 Likes

E D I T (for any one facing similar issue in future) :
Please find below the final working code “To download Bear images from DuckDuckGo”

2 Likes

Yes, this answer is great!
It works pretty well