Support Web of Science TBA dumps for PDF download - #3
Merged
Conversation
Restore a working fallback_bioc_pmc after a bad merge (syntax error that blocked importing paperscraper.pdf), re-add NCBIRateLimitError, fix missing as_completed/tqdm imports for medRxiv S3, load SPRINGER_API_KEY, and wire ChemRxiv Open Engage helpers into save_pdf. Also validate key_to_save and align the Elsevier mock test with header-based auth. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
- Guard bioRxiv/medRxiv S3 when AWS keys are missing - Recognize 10.1101 DOIs for preprint S3 fallbacks - Validate PDF bytes before opening files (fixes empty leftovers under mocks) - Skip S3 sections in tests without AWS credentials - Update paywalled-chapter expectation now that arXiv fallback can succeed Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
Accept WoS tab-delimited UTF-8 exports (savedrecs.txt) alongside .jsonl dumps. Adds load_wos_tba / load_papers_dump / wos_tba_to_jsonl helpers, maps DI/TI/AF/AB/PY/SO/PM fields into paperscraper metadata, and documents usage in the PDF retrieval examples. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
MoonDavid
marked this pull request as ready for review
August 5, 2026 13:26
Resolve simple overlap conflict in save_pdf_from_dump skip-logic (duplicate continue / key_to_save checks from both sides). Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
Live API retries can return fewer papers than the previous fixed thresholds, which made CI flake on test_whole_researcher. Co-authored-by: Davide Gotta <MoonDavid@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for Web of Science tab-delimited (TBA /
savedrecs.txt) exports insave_pdf_from_dump, so you can download PDFs/XMLs directly from a WoS export without converting to.jsonlfirst.Usage
In Web of Science: Export → Tab delimited / Tab-delimited (Win, UTF-8) (typically
savedrecs.txt).Optional conversion helper:
Field mapping
DI→doi,TI→title,AF→authors,AB→abstract,PY→date,SO→journal,PM→pubmed_id,UT→wos_idAlso includes
This branch is based on the PDF pipeline fixes (
bioc_pmcmerge repair, ChemRxiv wiring, etc.) so dump downloads work end-to-end.Verification
pytest paperscraper/tests/test_wos_tba.py→ 6 passedsavedrecs(1).txt(100 records loaded; first 5 downloaded: 1 PDF, 2 XML, 2 abstract-only for paywalled)