首页 > 编程语言 > 详细

python OSError: [Errno 22] Invalid argument: 'D:\\crawle\x01.html1'

时间:2017-09-29 22:24:02      阅读:2904      评论:0      收藏:0      [点我收藏+]

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:\\crawle\x01.html1'

原文:http://www.cnblogs.com/chenligeng/p/7612831.html

(0)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!