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()

 

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

 

 

只需如下添加即可

 

posted on 2017-09-29 21:26  JETIME庚  阅读(2980)  评论(1编辑  收藏  举报

导航