pic_url = "https://p.ananas.chaoxing.com/star3/80_80c/b0f142576e7b1edd50d554beb901bf88.png"
try:
response = requests.get(pic_url)
except:
print("请求失败")
else:
print(response.content)
with open('pic.png','wb') as f:
f.write(response.content)
requests模块基础—响应(爬虫基础)
最新推荐文章于 2024-08-25 20:43:39 发布