Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mechanize hits captcha but not detected by gem #23

Open
jurvis opened this issue Jan 18, 2019 · 1 comment
Open

mechanize hits captcha but not detected by gem #23

jurvis opened this issue Jan 18, 2019 · 1 comment

Comments

@jurvis
Copy link
Contributor

jurvis commented Jan 18, 2019

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&amp;Expires=1547779432&amp;Signature=QS936h%2B0t1uJqlmTzRHmZ3fNpRw%3D" data-refresh-url="/ap/captcha?appAction=SIGNIN&amp;captchaObfuscationLevel=ape:aGFyZA==&amp;captchaType=image" id="auth-captcha-image">
</div>
...
@jurvis
Copy link
Contributor Author

jurvis commented Jan 18, 2019

quick pr: #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant