import requests
url='图片链接'
path='../图片.jpg'
try:
r=requests.get(url)
f=open(path,'wb')
f.write(r.content) #写入二进制文件
f.close()
except:
print('失败!!!')
import requests
url='图片链接'
path='../图片.jpg'
try:
r=requests.get(url)
f=open(path,'wb')
f.write(r.content) #写入二进制文件
f.close()
except:
print('失败!!!')