Add comment about supporting Zenodo instances not at zenodo.org

pull/693/head
Tim Head 2019-05-29 07:10:35 +02:00
rodzic 8fe9c71826
commit e99c80799d
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -16,6 +16,10 @@ class Zenodo(ContentProvider):
def detect(self, doi, ref=None, extra_args=None):
"""Trigger this provider for things that resolve to a Zenodo record"""
# To support Zenodo instances not hosted at zenodo.org we need to
# start maintaining a list of known DOI prefixes and their hostname.
# We should also change to returning a complete `record_url` that
# fetch() can use instead of constructing a URL there
doi = doi.lower()
# 10.5281 is the Zenodo DOI prefix
if doi.startswith("10.5281/"):