Python-Requests下载远程图片

Python-Requests下载远程图片
返回Python,Requests,远程,下载,图片常用代码示例代码片段
import requests

def downImg(src):
    r=requests.get(src)
    if r.status_code==200:
        with open("./image",'wb') as f:  //下载到当前目录下的image
            f.write(r.content)
原文链接:https://rumenz.com/examples/python3/Python-Requests-down-image.html

【Linux常用命令速查手册】关注【入门小站】,后台回复 「1001」 自取。

点击下面标题即可获取对应PDF资料
↑回到顶部↑
入门小站 @2018