python用requests爬取png图片并保存到本地

版权声明:转载请注明作者(独孤尚良dugushangliang)出处:https://blog.csdn.net/dugushangliang/article/details/99634816

 

import requests as rq


file='D:/save.png'
url='http://……'

re=rq.get(url)
with open(file,'wb')as f:
    f.write(re.content)

 

独孤尚良dugushangliang——著

你可能感兴趣的:(#,Requests)