python OSError: [Errno 22] Invalid argument: 'D:\\crawle\x01.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()

技术分享

 

然而在这时我运行时出错了

 

 

只需如下添加即可

技术分享

 

文章来自:http://www.cnblogs.com/chenligeng/p/7612831.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3