Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pyopds2_openlibrary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,12 @@ def _build_ia_alternate_link(edition: OpenLibraryDataRecord.EditionDoc) -> Link:
Instead of an acquisition link pointing to the IA details page, we produce
a single ``rel=alternate`` link whose href is the webpub manifest endpoint.
An ``authenticate`` property tells the client where to obtain credentials.

Link schema: https://github.com/readium/webpub-manifest/blob/master/schema/link.schema.json
"""
identifier = edition.ia[0]
return Link(
title="Internet Archive",
href=f"https://archive.org/services/loans/loan/?action=webpub&identifier={identifier}&opds=1",
rel="alternate",
type="application/opds-publication+json",
Expand Down Expand Up @@ -818,4 +821,4 @@ def search(
if resp.page > 1:
base_params["page"] = str(resp.page)
resp.params = base_params
return resp
return resp
Loading