dowload image from requests

Posted otfsenter

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了dowload image from requests相关的知识,希望对你有一定的参考价值。

import requests 
import shutil 


url_png = "http://...png"
path_image = "/usr/local/001"

resp = requests.get(url, stream=True)

with open(path_image, ‘wb‘) as f:
      shutil.copyfileobj(resp.raw, f) 


以上是关于dowload image from requests的主要内容,如果未能解决你的问题,请参考以下文章