google-play-book-downloader icon indicating copy to clipboard operation
google-play-book-downloader copied to clipboard

Missing Pages

Open mslmn opened this issue 1 year ago • 5 comments

I'm getting this error when I run the script. Error! Couldn't find a download link for 128 pages (79% missing, total: 162 pages). Make sure that the FETCH_OPTIONS object is valid and that you own the book. I can read all the pages in the browser.

mslmn avatar Aug 22 '23 21:08 mslmn

still getting the same error.

mslmn avatar Feb 26 '24 22:02 mslmn

Same issue! any news?

duffy6 avatar Mar 22 '24 15:03 duffy6

I did some troubleshooting and found out why it happened: with some books, the program grabs the manifest.json for the free preview of the book (the one you see without an account), rather than the actual book.

For me, this workaround worked for downloading manga:

  1. Have your book open in Google Play in a Chromium browser
  2. Open Dev Tools, then go to the Sources section
  3. In the source books/reader?id=<bookID>&pg=<page>, there should be a script that lists a series of the page URLs. (It may require refreshing the page to see.)
  4. Copy the text from {metadata to ...contains_image_bubbles": false}
  5. Make a new file called manifest.json in the same directory as google-play-book-downloader-pdf.mjs and paste it in there.
  6. When you edit google-play-book-downloader-pdf.mjs, IN ADDITION to what you would normally do (i.e., adding the book ID and the request header in their respective sections):
    1. Comment out the lines beginning with:
      1. const manifest_text
      2. const manifest
      3. await fs.writeFile
    2. Add this line to the top: import manifest from "./manifest.json" assert { type: 'json' };

You will need to repeat Steps 3 to 5 for each book you want to download (i.e. grab the series of URLs from the page source, and overwrite manifest.json with them each time).

currythecoder avatar Apr 05 '24 06:04 currythecoder

@currythecoder Thank you for the investigation. It seems that the manifest indeed limits the number of page images now. We may need to migrate to using the content embedded in the page itself (it used to be incomplete iirc but now it looks good…)

Is the metadata.preview property in your manifest.json equal to partial or full?

devnoname120 avatar Apr 07 '24 17:04 devnoname120

@currythecoder Bump

devnoname120 avatar Jun 29 '24 12:06 devnoname120

same issue

michael753-yen avatar Jul 11 '24 11:07 michael753-yen

@michael753-yen Are you using the latest version? It's in Python now.

devnoname120 avatar Jul 11 '24 17:07 devnoname120