""" 下载图片 """
url = "图片链接"
filename = "图片存储的路径" # 记得加上文件名称
# 方法一,速度比较慢
import urllib.request
urllib.request.urlretrieve(url=url,filename=filename)
# 方法二
# 获得图片二进制,速度比方法一快了4倍
image = requests.get(url).content
with open(fileName,'wb') as f:
f.write(image)