【发布时间】:2015-08-06 16:57:02
【问题描述】:
正如您在帖子中看到的(Java):
getMFAResponseForSite - rendering array as a captcha image
和 (C#)
Yodlee: Unable to convert image codes into captcha in getMFAResponseForSite(Captcha type) - C#
Yodlee API getMFAResponseForSite 使用包含 MFA 表单的 JSON 来回答。在 Python 中,我正在尝试以下解决方案但没有结果:
import array
import base64
img_array = [66, 77, -98, -19, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40,...]
new_img_array = []
for x in img_array:
new_img_array.append(abs(x))
img_byte_array = bytearray(new_img_array)
fh = open("path.jpg", "wb")
fh.write(img_byte_array)
fh.close()
我尝试直接转换字节数组,但它会引发错误,因为字节值必须在 0-255 之间
我希望有人知道如何解决这个问题
【问题讨论】:
-
看看 [this][1] question,这可能会有所帮助。 [1]:stackoverflow.com/questions/5088671/…
标签: python authentication captcha yodlee