There seems to be a small subset arXiv papers that cannot be queried using arxiv2bib:
> arxiv2bib atom-ph/9601001
Error: Invalid arXiv identifier (atom-ph/9601001)
No successful matches
> arxiv2bib physics/9601001
Error: Not found (physics/9601001)
No successful matches
> arxiv2bib physics.atom-ph/9601001
HTTP Connection Error: 400
It might be because this is a pretty old arXiv ID; perhaps at the time, atom-ph was a top-level archive. The identifier is indeed atom-ph/..., not physics.atom-ph/... or physics/...:
> curl -L 'https://export.arxiv.org/api/query?id_list=atom-ph%2F9601001'
(OK)
> curl -L 'https://export.arxiv.org/api/query?id_list=physics.atom-ph%2F9601001'
(FAILURE)
> curl -L 'https://export.arxiv.org/api/query?id_list=physics%2F9601001'
(FAILURE)
The failure seems to be that arxiv2bib.py preemptively rejects the valid identifier because it does not match the OLD_STYLE regex, which does not allow atom-ph as a top-level archive name.
My suggested fixes would be to either 1) look up what archive names have been top-level archive prefixes in the past (presumably all those that are not two capital letters) and include them explicitly in the regex, 2) flatten out the list of archive names and allow any combination of these as a prefix with a joining dot, or 3) have a much more tolerant regex like r"""^[a-zA-Z.-]+/\d{7}(v\d+)?$""" and let the arXiv server complain if the ID is invalid.
Thanks for your useful tool otherwise!
There seems to be a small subset arXiv papers that cannot be queried using
arxiv2bib:It might be because this is a pretty old arXiv ID; perhaps at the time,
atom-phwas a top-level archive. The identifier is indeedatom-ph/..., notphysics.atom-ph/...orphysics/...:The failure seems to be that
arxiv2bib.pypreemptively rejects the valid identifier because it does not match theOLD_STYLEregex, which does not allowatom-phas a top-level archive name.My suggested fixes would be to either 1) look up what archive names have been top-level archive prefixes in the past (presumably all those that are not two capital letters) and include them explicitly in the regex, 2) flatten out the list of archive names and allow any combination of these as a prefix with a joining dot, or 3) have a much more tolerant regex like
r"""^[a-zA-Z.-]+/\d{7}(v\d+)?$"""and let the arXiv server complain if the ID is invalid.Thanks for your useful tool otherwise!