[Python] 图片爬取 →→→→→进入此内容的聊天室

来自 Silly Peafowl, 2022-05-12, 写在 Python, 查看 81 次.
URL http://www.code666.cn/view/8395f9dd
  1. import requests
  2. url=""
  3. #把链接放在这个里面
  4. path="I:/LALALA.jpg"
  5. #在这里面设置图片的存储位置和图片存储格式
  6. r=requests.get(url)
  7. #请求得到链接
  8. r.raise_for_status()
  9. r.encoding=r.apparent_encoding
  10. with open(path,"wb")as f:
  11.         f.write(r.content)
  12.  

回复 "图片爬取"

这儿你可以回复上面这条便签

captcha