python import furl url = furl.furl('https://www.example.com/path?param1=value1&param2=value2') print(url.scheme, url.host, url.path, url.args) url.scheme = 'http' url.host = 'www.newexample.com' url.args['param1'] = 'newvalue1' encoded_url = url.url.encode('utf-8') print(encoded_url) decoded_url = furl.furl(encoded_url.decode('utf-8')) print(decoded_url)


上一篇:
下一篇:
切换中文