import requests
url = ‘https://desk-fd.zol-img.com.cn/t_s960x600c5/g5/M00/05/0F/ChMkJ1erCYqIQptxAAPESMfBQZoAAUU6QB4oVwAA8Rg091.jpg’
headers = {
‘user-agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0’,
‘Accept’: ‘image/webp,image/apng,image/,/*;q=0.8’,
‘Accept-Language’: ‘en-US,en;q=0.9’,
‘Referer’: ‘https://www.zol.com.cn/’
}
res = requests.get(url=url, headers=headers)
print(res.status_code)
open(“tp.jpg”, ‘wb’).write(res.content)