-
-
Save paps/b7bd3a06a1ff0beb81c6e413d063bcdb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (await tab.isVisible(".captchaImage")) { | |
// Get the URL of the generated CAPTCHA image | |
// Note that we could also get its base64-encoded value and solve it too | |
const captchaImageLink = await tab.evaluate((arg, callback) => { | |
callback(null, $(".captchaImage").attr("src")) | |
}) | |
// Make a call to a CAPTCHA solving service | |
const captchaAnswer = await buster.solveCaptchaImage(captchaImageLink) | |
// Fill the form with our solution | |
await tab.fill(".captchaForm", { "captcha-answer": captchaAnswer }, { submit: true }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment