Skip to content

fix: replace deprecated download_pdf() with pdf_url for arxiv 4.0 compatibility#268

Merged
Jiaaqiliu merged 1 commit into
aiming-lab:mainfrom
DavidLiiiiii725:fix/arxiv-4-download-pdf
May 29, 2026
Merged

fix: replace deprecated download_pdf() with pdf_url for arxiv 4.0 compatibility#268
Jiaaqiliu merged 1 commit into
aiming-lab:mainfrom
DavidLiiiiii725:fix/arxiv-4-download-pdf

Conversation

@DavidLiiiiii725
Copy link
Copy Markdown
Contributor

Summary

  • arxiv 4.0 removed the Result.download_pdf() method
  • _convert_result() already worked with 4.0 (authors, primary_category unchanged)
  • Replaced with urllib.request.urlretrieve(result.pdf_url, ...) which is the new API

Test plan

  • Tested search_arxiv() against arxiv 4.0 — works
  • Tested download_pdf() for 3 papers — all downloaded correctly
  • Added pdf_url null check for robustness

🤖 Generated with Claude Code

…patibility

arxiv 4.0 removed the Result.download_pdf() method. Use result.pdf_url
with urllib.request.urlretrieve instead.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@huaxiuyao huaxiuyao requested a review from Jiaaqiliu May 22, 2026 14:36
@Jiaaqiliu Jiaaqiliu merged commit be1b10f into aiming-lab:main May 29, 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.

2 participants