Python:网络图片的爬取和存储

>>> import requests
>>> path="d:/del.jpg"
>>> url="https://img-blog.csdnimg.cn/20210317155124696.png"
>>> r=requests.get(url)
>>> r.status_code
200
>>> with open(path,'wb') as f:
	f.write(r.content)

	
17217
>>> f.close()
>>> 

 

posted @ 2021-04-12 19:48  挖掘机斯基  阅读(60)  评论(0编辑  收藏  举报