urlparse
Returns ParseResult with scheme, netloc, path, query, etc.
from urllib.parse import urlparse
u = urlparse('https://example.com/path?a=1')
print(u.path, u.query)
Returns ParseResult with scheme, netloc, path, query, etc.
from urllib.parse import urlparse
u = urlparse('https://example.com/path?a=1')
print(u.path, u.query)