1>>> from urllib.parse import urljoin
2>>> urljoin('/media/path/', 'js/foo.js')
3'/media/path/js/foo.js'
4
1from urllib.parse import urlparse, parse_qs
2URL='https://someurl.com/with/query_string?i=main&mode=front&sid=12ab&enc=+Hello'
3parsed_url = urlparse(URL)
4parse_qs(parsed_url.query)