您的位置:首页 > 编程语言 > Python开发

python3的requests模块下载图片到本地

2018-08-23 12:36 246 查看
版权声明:版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/z564359805/article/details/81978913
[code]import requests
# 图片地址
url = 'http://www.open-open.com/bbs/uploadImg/20160107/20160107133856_341.jpg'
html = requests.get(url)
# 将图片保存到D盘
with open("D:/1.jpg","wb")as f:
f.write(html.content)

 

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: