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

 

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

 

 

只需如下添加即可

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM