MiniGlome / Archive.org-Downloader

Python3 script to download archive.org books in PDF format
930 stars 123 forks source link

Index error - URL Parse ? #112

Open RupertB-ES opened 9 months ago

RupertB-ES commented 9 months ago

Current book: https://archive.org/details/marquis-no.-7-1996-fetish-d.-d.-teoli-jr.-a.-c.-52 This book doesn't need to be borrowed Traceback (most recent call last): File "C:\archive.org\archive-org-downloader.py", line 215, in title, links, metadata = get_book_infos(session, url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\archive.org\archive-org-downloader.py", line 21, in get_book_infos infos_url = "https:" + r.split('"url":"')[1].split('"')[0].replace("\u0026", "&")


IndexError: list index out of range
darnn commented 9 months ago

Don't take this as definitive, but I suspect the issue is that this hasn't been uploaded as a "book", but rather as an "image", as you can see here in media type: https://archive.org/search?query=+Marquis+No.7+1996+Fetish+Rubberist+Magazine+D.+D.+Teoli+Jr.+A.+C.+

RupertB-ES commented 9 months ago

There is a similar one that is a PDF but this one is just a set of JPEGs it would be nice if that could be noticed and then download them and reassemble instead

ali7mrd commented 8 months ago

I was having the same problem. Deleting the archive-org-downloader.py file from the directory that it was saved in (for me it was saved in C:\Users\Ali), replacing it with the same file downloaded from the repository, and then running the "pip install -r requirements.txt" command again solved the issue.