ostrolucky/Bulk-Bing-Image-downloader

File mode weirdness

jacobsandersen opened this issue · 4 comments

I am using this command on Python 3.9.1:
python bbid.py -f words.txt -o downloaded --limit 5

It successfully downloads quite a few images for the first term in the file and then does not download anything after that. It just keeps printing "history dumped" forever.

Here is my words.txt: https://gist.github.com/simpleauthority/badd0aeff61a75a8e0d895e9eafb1c6b

Is there any extra information I can provide you? I've used this before, and it worked, but now it is not working.

Well, --limit doesn't work as you assume it does. When total number of images are downloaded, it doesn't download anything more. I've pushed a fix which makes script exit in such situation to make it more obvious.

Thanks! Yep, you're right. I thought it was limit per keyword, not total limit. Is there a way to specify limit per keyword, or does it just download as much as possible for each keyword when in file mode?

Edit: nevermind, I was able to achieve my desired result with a simple file edit, thanks!

Cool, can you share your change? I might consider applying it some time here directly.

Sure I will try to formalize it and submit a PR, as what I did was a dirty hack to make it work