kelciour/batch-download-pictures-from-google-images

add on completely broken

Closed this issue · 6 comments

I think google may have released a DOM change and as a result, this add on seems to be completely broken. I've debugged it a bit and it comes down to this:

Traceback (most recent call last):
  File "/Users/selliott/Library/Application Support/Anki2/addons21/561924305/__init__.py", line 242, in getImages
    for d in data[31][0][12][2]:
IndexError: list index out of range

I've also dumped the json to a file, but I'm really not sure why the [31][0][12][2] path is being used. Like I said, I'm guessing there was a google DOM update on their search results, but I'm not sure. I will link the json in a comment.

json is here

For anyone coming here, hoping for a fix I forked this repo and put in my own fix (basically just grabs the first jpg file). It's here if you want to use it. You will need to manually overwrite your anki add on (it's the init.py file). Good luck!

Thank you for the issue and the fix!

Im still having trouble making it work. I replaced the code in init.py file but it still doesn't work.

@Jerenn maybe try to reinstall the add-on. If the add-on can't be removed, restart Anki and try again. Maybe use "Overwrite" instead of "Skip". Maybe export and attach one note as .apkg file with a screenshot of the add-on's window.

@kelciour thank you. will try that