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

7 stars 5 forks source link

add on completely broken #7

Closed javamonkey79 closed 1 year ago

javamonkey79 commented 1 year ago

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.

javamonkey79 commented 1 year ago

json is here

javamonkey79 commented 1 year ago

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!

kelciour commented 1 year ago

Thank you for the issue and the fix!

Jerenn commented 1 year ago

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

kelciour commented 1 year ago

@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.

Jerenn commented 1 year ago

@kelciour thank you. will try that