【发布时间】:2013-04-03 22:56:11
【问题描述】:
我需要知道如何在 python 中构建 URL,例如:
http://subdomain.domain.com?arg1=someargument&arg2=someotherargument
您会推荐使用哪个库,为什么?这种库有“最佳”选择吗?
另外,您能否提供我开始使用该库的示例代码?
【问题讨论】:
-
Requests (docs.python-requests.org/en/latest) 一般推荐,但它不是内置模块。
-
没关系,我要的是任何库,不管它是不是内置的。谢谢!
-
ParseResult(scheme='https', netloc='example.com', path='path', params='', query='', fragment='').geturl()
标签: python