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:crawlehtml1","wb")

fhandle.write(data)

fhandle.close()

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

只需如下添加即可

你来是缘分,你走也是
原文地址:https://www.cnblogs.com/chenligeng/p/7612831.html