blob: 4cedb04d04e1a53f0097540708fb392ea49b7fbe [file] [log] [blame]
import re
urlparts = re.compile(
r"""
(?P<scheme>http|https)
://
(?P<netloc>(?:(?!/|\?|\#)\S)*)
/?
(?P<path>(?:(?!\?|\#)\S)*)
\??
(?P<query>(?:(?!\#)\S)*)
\#?
(?P<fragment>[\S]*)
""", re.VERBOSE
)