PearsonEbookDownloader icon indicating copy to clipboard operation
PearsonEbookDownloader copied to clipboard

Error when adding bookmarks

Open YachtSail opened this issue 5 years ago • 2 comments

Hey, I tried to use your script after getting annoyed by Pearson's sluggish e-reader, and the files did download to the temp folder as I checked. However, I got an error when it's merging the pdf file. It looks like this:

Downloading metadata and eText information... Downloading pages to "C:\Users***\AppData\Local\Temp\tmpq_kuj3a4"... Assembling PDF... PdfReadWarning: Xref table not zero-indexed. ID numbers for objects will be corrected. [pdf.py:1736] Adding bookmarks... Traceback (most recent call last): File "downloader.py", line 205, in main(sys.argv[1]) File "downloader.py", line 151, in main recursiveSetBookmarks(bookmarkInfo['document'][0]['bc']['b']['be']) File "downloader.py", line 148, in recursiveSetBookmarks recursiveSetBookmarks(bookmark['be'], latestBookmark) File "downloader.py", line 142, in recursiveSetBookmarks bookmarkName = bookmark['n'] # Name of the section TypeError: string indices must be integers

What's the issue here? Did I do something wrong? Thanks a ton in advance :)

YachtSail avatar Mar 19 '19 14:03 YachtSail

Should be fixed in the latest commit, let me know if it works, otherwise I might need some more information (the book's ID/5 digit bookid in the GET parameters)

NoMod-Programming avatar Mar 23 '19 22:03 NoMod-Programming

I can no longer access the books, unfortunately. However, I did save the individual pages from the temp folder, as well as the bookmarkInfo of the books (printed after line bookmarkInfo = bookmarkInfo[0]['basketsInfoTOList'][0]). Is there a way to allow me to merge files locally with the bookmarkInfo? My limited knowledge forbade me from figuring out the code :(

YachtSail avatar Mar 24 '19 12:03 YachtSail