Skip to content

Commit

Permalink
Merge pull request #229 from MrNeRF/arxiv-pdf
Browse files Browse the repository at this point in the history
Parse arxiv PDF links
  • Loading branch information
MrNeRF authored Jan 3, 2025
2 parents d2373e5 + c036c95 commit 08f8e6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arxiv_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ def extract_arxiv_id(self, url_or_id: str) -> str:

# Extract ID from path
path = parsed.path
if 'abs' in path:
if 'abs' in path or 'pdf' in path:
arxiv_id = path.split('/')[-1]
# Remove .pdf extension if present
if arxiv_id.endswith('.pdf'):
arxiv_id = arxiv_id[:-4]
else:
# If it's already an ID format (YYMM.NNNNN)
arxiv_id = path.strip('/')
Expand Down

0 comments on commit 08f8e6c

Please sign in to comment.