我正在玩一个基于网络的游戏,试图破解一个反机器人。 我已经用Python/Selenium编写了一个bot,现在我正在尝试编写一个“破解反bot”函数
我已经拍摄了antibot的屏幕截图(因为antibot是一个php文件,在重新加载时会发生更改)
以下是反机器人的四张不同图片:
这是我的密码:
output = pytesseract.image_to_string(PIL.Image.open('ab1.png').convert("RGB"))
output2 = pytesseract.image_to_string(PIL.Image.open('ab2.png').convert("RGB"))
output3 = pytesseract.image_to_string(PIL.Image.open('ab3.png').convert("RGB"))
output4 = pytesseract.image_to_string(PIL.Image.open('ab4.png').convert("RGB"))
print (output, output2, output3, output4)
以及输出:
i A
使用Tesseract有没有办法获得更好的结果? 谢谢你的帮助
好的,我已经走了这么远。白底黑字。 但是,如何使文本更具可读性呢
输出如下所示:
相关问题 更多 >
编程相关推荐