Skip to content

Instantly share code, notes, and snippets.

@hsolbrig
Created March 18, 2021 18:37
Show Gist options
  • Save hsolbrig/d83d828dedcf090888871164c12f290a to your computer and use it in GitHub Desktop.
Save hsolbrig/d83d828dedcf090888871164c12f290a to your computer and use it in GitHub Desktop.
Urllib/rdflib parser issue
from urllib.parse import urlparse
from rdflib import Namespace
url = "https://w3id.org/linkml/"
print(urlparse(url))
print(urlparse(Namespace(url)))
@hsolbrig
Copy link
Author

The output of line 6 is:
ParseResult(scheme='https', netloc='w3id.org', path='/linkml/', params='', query='', fragment='')

and line 7 is:
ParseResult(scheme='', netloc='', path=Namespace('https://w3id.org/linkml/'), params='', query='', fragment='')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment