Skip to content

Redirect DAISY pages to Archive item pages#13049

Open
nathanpixodeo wants to merge 2 commits into
internetarchive:masterfrom
nathanpixodeo:9439/fix/daisy-archive-redirect
Open

Redirect DAISY pages to Archive item pages#13049
nathanpixodeo wants to merge 2 commits into
internetarchive:masterfrom
nathanpixodeo:9439/fix/daisy-archive-redirect

Conversation

@nathanpixodeo

Copy link
Copy Markdown

Refs #9439

Fixes the stale /books/.../daisy flow by redirecting editions with an ocaid to their Internet Archive item page instead of rendering the old page with a guessed _daisy.zip download URL.

Technical

  • Adds a redirect from the DAISY route to https://archive.org/details/{ocaid} when an edition has an Archive identifier.
  • URL-escapes the Archive identifier path segment before redirecting.
  • Keeps the existing no-ocaid fallback page behavior.

Testing

  • python -m py_compile openlibrary/plugins/upstream/addbook.py openlibrary/plugins/upstream/tests/test_addbook.py
  • python -m ruff check openlibrary/plugins/upstream/addbook.py openlibrary/plugins/upstream/tests/test_addbook.py
  • Attempted targeted pytest locally, but this machine only has Python 3.13 while Open Library requires Python 3.14; pytest import fails under 3.13 before reaching this test because annotations in openlibrary/core/helpers.py are evaluated differently.

Screenshot

Not applicable; this is a redirect behavior change.

Stakeholders

@mekarpeles

@openlibrary-bot

Copy link
Copy Markdown
Collaborator

Thank you @nathanpixodeo for submitting this issue! Welcome to Open Library — this is your first contribution! 🎉

🤖 Copilot has been assigned for an initial review.

A reviewer must first be assigned. There are currently 104 open non-draft PRs of equal or higher priority ahead of yours.

PR triage checklist (maintainers / Richy)
  • PR description — not empty; explains what the change does and how to verify it
  • References an issue — PR body contains #9439
  • Commit history clean — 1 clean commit with meaningful message
  • CI passing — pre-commit.ci pending
  • Test cases present — 50 lines added to tests/test_addbook.py covering the redirect behavior
  • Proof of testing — PR body documents py_compile and ruff check passes; explains pytest environment constraint

Note

This comment was automatically generated by PAM, Open Library's Project AI Manager. PAM provides status visibility, performs basic project management functions, and gives actionable feedback so contributors aren't left waiting.

@github-actions github-actions Bot added the Needs: Response Issues which require feedback from lead label Jun 26, 2026
@mekarpeles mekarpeles removed the Needs: Response Issues which require feedback from lead label Jul 4, 2026
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

Successfully merging this pull request may close these issues.

3 participants