From e14e039c4c0ccbc0db3c58cd71c09e8c3146f6fe Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 21 May 2019 11:49:56 -0700 Subject: correct JSTOR fix --- python/fatcat_tools/importers/jstor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'python/fatcat_tools/importers') diff --git a/python/fatcat_tools/importers/jstor.py b/python/fatcat_tools/importers/jstor.py index 7d630b6b..d8f0463e 100644 --- a/python/fatcat_tools/importers/jstor.py +++ b/python/fatcat_tools/importers/jstor.py @@ -49,6 +49,12 @@ class JstorImporter(EntityImporter): extra = dict() extra_jstor = dict() + title = article_meta.find("article-title") + if title: + title = title.string.strip() + if title.endswith('.'): + title = title[:-1] + release_type = "article-journal" if "[Abstract]" in title: # TODO: strip the "[Abstract]" bit? @@ -104,12 +110,6 @@ class JstorImporter(EntityImporter): if jstor_id: jstor_id = jstor_id.string - title = article_meta.find("article-title") - if title: - title = title.string.strip() - if title.endswith('.'): - title = title[:-1] - contribs = [] cgroup = article_meta.find("contrib-group") if cgroup: -- cgit v1.2.3