python OSError: [Errno 22] Invalid argument: 'D:crawlex01.html1'
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python OSError: [Errno 22] Invalid argument: 'D:crawlex01.html1'相关的知识,希望对你有一定的参考价值。
import urllib.request
file = urllib.request.open("http://www.baidu.com")
data = file.read()
print(data)
fhandle = open("D:\\crawle\\html1","wb")
fhandle.write(data)
fhandle.close()
然而在这时我运行时出错了
只需如下添加即可
以上是关于python OSError: [Errno 22] Invalid argument: 'D:crawlex01.html1'的主要内容,如果未能解决你的问题,请参考以下文章