Python的urlparse函数将url解析为六个组件(scheme,netloc,path和其他东西)Python urlparse,正确或不正确?
现在我发现解析“example.com/path/file.ext”不会返回netloc,而是返回一个路径“ example.com/path/file.ext”。
不应该是netloc =“example.com”和path =“/path/file.ext”?
我们真的需要一个“://”来确定是否存在网络地址吗?
Python的票:http://bugs.python.org/issue8284
但是你可以有这样的 然后类似example会是正确的 –
Ben
2010-04-01 22:23:35