Skip to content

Commit 07548d3

Browse files
authored
Merge pull request #1772 from dandi/bf-obo
Switch to use /rdf/ renderer for purl obo urls
2 parents 78b7700 + 5984426 commit 07548d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dandi/metadata/util.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,11 @@ def parse_purlobourl(
425425
:return: dictionary containing found nodes
426426
"""
427427

428-
req = requests.get(url, allow_redirects=True)
428+
if url.startswith(NCBITAXON_URI_TEMPLATE.format("")):
429+
rdf_content_url = f"https://ontobee.org/ontology/rdf/NCBITaxon?iri={url}"
430+
req = requests.get(rdf_content_url, allow_redirects=True)
431+
else:
432+
req = requests.get(url, allow_redirects=True)
429433
req.raise_for_status()
430434
doc = parseString(req.text)
431435
for elfound in doc.getElementsByTagName("Class"):

0 commit comments

Comments
 (0)