requests保存图片

1.创建07_save_jpg.py文件

import requests

#发送请求
respone = requests.get("https://www.baidu.com/img/bd_logo1.png?where=super")
#保存
with open("a.png","wb")as f:
f.write(respone.content)
2.运行代码

 
  
 

转载于:https://www.cnblogs.com/simpleBlue3/p/10633737.html

猜你喜欢

转载自blog.csdn.net/weixin_34413065/article/details/93307517