Download academic papers from ArXiv, Google Scholar, ACM, Springer, and GitHub
Project description
respf - Research Paper Fetcher
A Python package for downloading academic papers from ArXiv, Google Scholar, ACM, Springer, and GitHub.
Installation
pip install respf
Usage
CLI
# Download by title
respf "Attention Is All You Need"
# Download by ArXiv URL
respf https://arxiv.org/abs/2103.00020
# Specify sources
respf "BERT" --sources arxiv,google_scholar
# Download from citations file
respf --file citations.txt --dir ./papers
# Parse academic citation formats (APA, IEEE, Chicago, MLA, BibTeX)
respf --file citations.txt --parse --dir ./papers
# Get paper info
respf --info https://arxiv.org/abs/2103.00020
# For corporate networks (SSL issues)
respf "Paper Title" --use-system-certs
# Generate summary.json for PDFs in a folder
respf --summarize --dir ./papers
PDF Summarization
Generate a summary.json file with extracted text from all PDFs in a directory:
# Summarize all PDFs in a directory
respf --summarize --dir ./papers
# Output as JSON
respf --summarize --dir ./papers --json
Output (summary.json):
[
{
"pdf_name": "Attention_Is_All_You_Need.pdf",
"num_pages": 11,
"first_page_text": "...",
"abstract_on_first_page": true
}
]
Install with summarize support:
pip install respf[summarize]
# Also requires: sudo apt install build-essential libpoppler-cpp-dev pkg-config
Python API
from respf import ResearchPaperDownloader, download_paper, get_paper_info
# Simple usage
result = download_paper("Attention Is All You Need", download_dir="papers")
# Or use the class
downloader = ResearchPaperDownloader(download_dir="papers")
result = downloader.download_paper("https://arxiv.org/abs/2103.00020")
# Get info without downloading
info = get_paper_info("Attention Is All You Need")
print(info["title"], info["authors"])
Async API
import asyncio
from respf import ResearchPaperDownloader
async def main():
downloader = ResearchPaperDownloader(download_dir="papers")
result = await downloader.async_download_paper("https://arxiv.org/abs/2103.00020")
print(result)
asyncio.run(main())
Sources
- ArXiv - Direct download by ID or title search
- Google Scholar - Search and find PDFs
- ACM Digital Library - Download from ACM
- Springer Link - Download from Springer
- GitHub - Find PDFs in repositories
Options
| Flag | Description |
|---|---|
--file, -f |
File with citations (one per line) |
--parse |
Parse academic citation formats (APA, IEEE, Chicago, MLA, BibTeX) |
--dir, -d |
Download directory (default: papers) |
--sources, -s |
Sources to use (comma-separated) |
--info, -i |
Get metadata without downloading |
--json, -j |
Output as JSON |
--summarize |
Generate summary.json for PDFs in directory |
--use-system-certs |
Use system CA certs (corporate networks) |
Troubleshooting
SSL Certificate Errors
If you get SSL errors in corporate networks, use --use-system-certs:
respf "Paper Title" --use-system-certs
This uses your system's CA certificates instead of Python's certifi bundle.
License
MIT