mechanize hits captcha but not detected by gem
jurvis opened this issue · 1 comments
jurvis commented
Description
Captcha error not printed when mechanize encounters one.
Expected Behaviour
When captcha is shown on login, application should print:
KindleHighlights::Client::CaptchaError: Received a CAPTCHA while attempting to sign in to your Amazon account. You will need to resolve this manually at <link to remedy captcha errors>
Turns out Amazon changed the id
tag they use for the captcha image from ap_captcha_img
to auth-captcha-image
:
...
<div id="auth-captcha-image-container" class="a-section a-text-center">
<img alt="Visual CAPTCHA image, continue down for an audio option." src="https://opfcaptcha-prod.s3.amazonaws.com/f3eb1f1041fa4a3f91ccdba0fa5fd578.jpg?AWSAccessKeyId=AKIAIRWCIOSGWYRDLHHQ&Expires=1547779432&Signature=QS936h%2B0t1uJqlmTzRHmZ3fNpRw%3D" data-refresh-url="/ap/captcha?appAction=SIGNIN&captchaObfuscationLevel=ape:aGFyZA==&captchaType=image" id="auth-captcha-image">
</div>
...