Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posible solution for: "Borrow Unavailable"/"Book available to patrons with print disabilities" #99

Open
mrelg opened this issue Dec 6, 2023 · 2 comments

Comments

@mrelg
Copy link

mrelg commented Dec 6, 2023

possible solution to issue #65 & issue #88 (will require some coding)

Description:
Many books have been set to only be "previewable" and "available to patrons with print disabilities" with following consequences:

The "Archive.org-Downloader" script unsuccessfully tries to borrow and defaults to "This book doesn't need to be borrowed" and proceeds to download a few available/previewable pages and a bunch of images from redirections to "https://archive.org/bookreader/static/preview-unavailable.png"

example book:
https://archive.org/details/electricnetworks0000unse_l8w2

  1. example of an unavailable image from page 300 (leaf 326):
    https://ia902509.us.archive.org/BookReader/BookReaderPreview.php?id=electricnetworks0000unse_l8w2&subPrefix=electricnetworks0000unse_l8w2&itemPath=/22/items/electricnetworks0000unse_l8w2&server=ia902509.us.archive.org&page=leaf326&fail=preview&&scale=1&rotate=0

  2. example of redirection:
    https://archive.org/bookreader/static/preview-unavailable.png

  3. forcing a call to direct link to the leaf 326 (n325):
    https://archive.org/details/electricnetworks0000unse_l8w2/page/n325/mode/1up

  4. redrects to page 300:
    https://archive.org/details/electricnetworks0000unse_l8w2/page/300/mode/1up

  5. after that, the image link (leaf 326) temporarily stops redirecting:
    https://ia902509.us.archive.org/BookReader/BookReaderPreview.php?id=electricnetworks0000unse_l8w2&subPrefix=electricnetworks0000unse_l8w2&itemPath=/22/items/electricnetworks0000unse_l8w2&server=ia902509.us.archive.org&page=leaf326&fail=preview&&scale=1&rotate=0

I'm not sure if brute forcing many page calls leads to denial of access, but I think it has to be done one at a time since after opening a few direct page links the first one of them restarts redirecting to unavailable.png

@mrelg
Copy link
Author

mrelg commented Dec 7, 2023

Sadly this works only until it detects abuse from asking for too many pages too quickly, so a decent back-off timer is required.

@HaaiSo
Copy link

HaaiSo commented Jul 27, 2024

It seems impossible to reproduce stably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants