aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r--python/fatcat_tools/importers/arxiv.py4
-rw-r--r--python/fatcat_tools/importers/jalc.py2
2 files changed, 4 insertions, 2 deletions
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]
diff --git a/python/fatcat_tools/importers/jalc.py b/python/fatcat_tools/importers/jalc.py
index 8dd4f3e5..fa3c108d 100644
--- a/python/fatcat_tools/importers/jalc.py
+++ b/python/fatcat_tools/importers/jalc.py
@@ -98,7 +98,7 @@ class JalcImporter(EntityImporter):
doi = doi.replace('http://doi.org/', '')
elif doi.startswith('https://doi.org/'):
doi = doi.replace('https://doi.org/', '')
- if not doi.startswith('10.'):
+ if not (doi.startswith('10.') and '/' in doi):
sys.stderr.write("bogus JALC DOI: {}\n".format(doi))
doi = None
if not doi: