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'

 

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

 

 

只需如下添加即可

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-30
  • 2021-08-01
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案