From 5927bee04145a8b398172a17582ed312206f7914 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 22 May 2019 09:58:41 -0700 Subject: better JALC and arxiv DOI checks --- python/fatcat_tools/importers/arxiv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python/fatcat_tools/importers/arxiv.py') diff --git a/python/fatcat_tools/importers/arxiv.py b/python/fatcat_tools/importers/arxiv.py index cbe66d8c..c8133b30 100644 --- a/python/fatcat_tools/importers/arxiv.py +++ b/python/fatcat_tools/importers/arxiv.py @@ -88,7 +88,9 @@ class ArxivRawImporter(EntityImporter): doi = None if metadata.doi and metadata.doi.string: doi = metadata.doi.string.lower().strip() - assert doi.startswith('10.') + if not (doi.startswith('10.') and '/' in doi: + sys.stderr.write("BOGUS DOI: {}\n".format(doi)) + doi = None title = latex_to_text(metadata.title.string) authors = parse_arxiv_authors(metadata.authors.string) contribs = [fatcat_client.ReleaseContrib(raw_name=a, role='author') for a in authors] -- cgit v1.2.3