diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-02-18 22:08:21 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-02-18 22:08:21 -0800 |
commit | c1fdc9e25cfa6e24277b3e84c3a4bd36ab61e314 (patch) | |
tree | 506eba1f7b0840a8709341d408348c3baaa0e39b /python | |
parent | 4cbc94cd708c1db80a232150ab2cf56dddf83e62 (diff) | |
download | fatcat-c1fdc9e25cfa6e24277b3e84c3a4bd36ab61e314.tar.gz fatcat-c1fdc9e25cfa6e24277b3e84c3a4bd36ab61e314.zip |
ingest importer: pass through link rel
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat_tools/importers/ingest.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py index fdaba176..bc2b4515 100644 --- a/python/fatcat_tools/importers/ingest.py +++ b/python/fatcat_tools/importers/ingest.py @@ -137,7 +137,12 @@ class IngestFileResultImporter(EntityImporter): if not 'terminal_dt' in terminal: terminal['terminal_dt'] = terminal['dt'] assert len(terminal['terminal_dt']) == 14 - url = make_rel_url(terminal['terminal_url'], self.default_link_rel) + + default_rel = self.default_link_rel + if request.get('link_source') == 'doi': + default_rel = 'publisher' + default_rel = request.get('rel', default_rel) + url = make_rel_url(terminal['terminal_url'], default_rel) if not url: self.counts['skip-url'] += 1 |