赞
踩
import requests
imgUrl = 'http://img3m0.ddimg.cn/9/25/1674043380-1_b_1.jpg'
headers = {
'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Mobile Safari/537.36'
}
res = requests.get(imgUrl, headers=headers).content
print(res)
name = '3'
with open(name + '.jpg', 'wb') as f:
f.write(res)
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。