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
4 changes: 2 additions & 2 deletions skills/how-to-download-ref/helpers/fetch_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def fetch_doi_pdf(doi: str, meta: dict, out: Path, email: str = "") -> str:
if fetch_pdf(url, out):
return "unpaywall"
arxiv = (meta.get("externalIds") or {}).get("ArXiv")
if arxiv and fetch_pdf(f"https://arxiv.org/pdf/{arxiv}.pdf", out):
if arxiv and fetch_pdf(f"https://arxiv.org/pdf/{arxiv}", out):
return "arxiv"
return "miss"

Expand Down Expand Up @@ -271,7 +271,7 @@ def main() -> int:
if valid_pdf(out):
print(f" ok arxiv:{aid} (cached)")
continue
if fetch_pdf(f"https://arxiv.org/pdf/{aid}.pdf", out):
if fetch_pdf(f"https://arxiv.org/pdf/{aid}", out):
print(f" ok arxiv:{aid}")
else:
print(f" FAIL arxiv:{aid}")
Expand Down
Loading