【发布时间】:2016-01-11 11:21:22
【问题描述】:
参考this链接我可以检索路径和文件名。
此外,我想将文件命名为-
D:\Links\文件名
例如-
http://www.example.com/category/location/filename - 将是原版
D:\Links\category\location\filename.html - 是我想要做的,因为它将作为 -
fttp://D:/Links/category/location/filename.html
欢迎任何形式的帮助/指导。
非常感谢:)
【问题讨论】:
-
对不起,这个很不清楚。你到底在哪里遇到问题?到目前为止你有什么代码?
-
@DanielRoseman- 下面的答案效果很好。我只想在解析 url 时设置本地驱动器路径。抱歉,虽然我得到了正确的解决方案,但我还不够清楚。
标签: python python-2.7 urllib2 urllib