1.1.2. radical.utils.contrib package¶
1.1.2.1. Submodules¶
1.1.2.2. radical.utils.contrib.urlparse25 module¶
- radical.utils.contrib.urlparse25.urldefrag(url)[source]¶
Removes any existing fragment from URL.
Returns a tuple of the defragmented URL and the fragment. If the URL contained no fragments, the second element is the empty string.
- radical.utils.contrib.urlparse25.urljoin(base, url, allow_fragments=True)[source]¶
Join a base URL and a possibly relative URL to form an absolute interpretation of the latter.
- radical.utils.contrib.urlparse25.urlparse(url, scheme='', allow_fragments=True)[source]¶
Parse a URL into 6 components:
<scheme>://<netloc>/<path>;<params>?<query>#<fragment>
Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
Note that we don’t break the components up in smaller bits (e.g. netloc is a single string) and we don’t expand % escapes.
- radical.utils.contrib.urlparse25.urlsplit(url, scheme='', allow_fragments=True)[source]¶
Parse a URL into 5 components:
<scheme>://<netloc>/<path>?<query>#<fragment>
Return a 5-tuple: (scheme, netloc, path, query, fragment).
Note that we don’t break the components up in smaller bits (e.g. netloc is a single string) and we don’t expand % escapes.