如何在python请求的响应内容中捕获流式图像

问题描述

此问题是因为在首个响应验证码图像中,服务器在会话中设置了它的值,然后再次下载该URL会产生不同的值和图像。

import requests
import base64
img_SRC ="https://example.com//Account/Captchaimage?mode=b&1597080394516"
res=requests.get(img_SRC)
b64response = base64.b64encode(res.content)
saveurl=('/Users/abc/Downloads/captcha/captcha.jpg')
with open(saveurl,'wb') as f:
    f.write(res.content)nter code here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)