Closed e-moshaya closed 4 years ago
Could you run your script with debug output enabled and paste that here?
DEBUG=puppeteer-extra,puppeteer-extra-plugin:* node myscript.js
@berstend debug output below:
puppeteer-extra-plugin:base:anonymize-ua Initialized. +0ms
puppeteer-extra plugin registered anonymize-ua +0ms
puppeteer-extra-plugin:base:recaptcha Initialized. +0ms
puppeteer-extra-plugin:recaptcha Initialized { visualFeedback: true,
throwOnError: false,
provider: { id: '2captcha', token: '' } } +0ms
puppeteer-extra plugin registered recaptcha +3ms
puppeteer-extra-plugin:base:stealth Initialized. +0ms
puppeteer-extra plugin registered stealth +1ms
puppeteer-extra dependencies missing Set {
'stealth/evasions/chrome.runtime',
'stealth/evasions/console.debug',
'stealth/evasions/navigator.languages',
'stealth/evasions/navigator.permissions',
'stealth/evasions/navigator.webdriver',
'stealth/evasions/navigator.plugins',
'stealth/evasions/window.outerdimensions',
'stealth/evasions/webgl.vendor',
'stealth/evasions/user-agent' } +2ms
puppeteer-extra-plugin:base:stealth/evasions/chrome.runtime Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/chrome.runtime +2ms
puppeteer-extra-plugin:base:stealth/evasions/console.debug Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/console.debug +2ms
puppeteer-extra-plugin:base:stealth/evasions/navigator.languages Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/navigator.languages +1ms
puppeteer-extra-plugin:base:stealth/evasions/navigator.permissions Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/navigator.permissions +2ms
puppeteer-extra-plugin:base:stealth/evasions/navigator.webdriver Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/navigator.webdriver +2ms
puppeteer-extra-plugin:base:stealth/evasions/navigator.plugins Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/navigator.plugins +2ms
puppeteer-extra-plugin:base:stealth/evasions/window.outerdimensions Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/window.outerdimensions +3ms
puppeteer-extra-plugin:base:stealth/evasions/webgl.vendor Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/webgl.vendor +3ms
puppeteer-extra-plugin:base:stealth/evasions/user-agent Initialized. +0ms
puppeteer-extra plugin registered stealth/evasions/user-agent +3ms
puppeteer-extra no dependencies are missing +1ms
puppeteer-extra orderPlugins:before [ 'anonymize-ua',
'recaptcha',
'stealth',
'stealth/evasions/chrome.runtime',
'stealth/evasions/console.debug',
'stealth/evasions/navigator.languages',
'stealth/evasions/navigator.permissions',
'stealth/evasions/navigator.webdriver',
'stealth/evasions/navigator.plugins',
'stealth/evasions/window.outerdimensions',
'stealth/evasions/webgl.vendor',
'stealth/evasions/user-agent' ] +0ms
puppeteer-extra orderPlugins:after [ 'anonymize-ua',
'recaptcha',
'stealth',
'stealth/evasions/chrome.runtime',
'stealth/evasions/console.debug',
'stealth/evasions/navigator.languages',
'stealth/evasions/navigator.permissions',
'stealth/evasions/navigator.webdriver',
'stealth/evasions/navigator.plugins',
'stealth/evasions/window.outerdimensions',
'stealth/evasions/webgl.vendor',
'stealth/evasions/user-agent' ] +0ms
puppeteer-extra-plugin:recaptcha onPageCreated +0ms
puppeteer-extra-plugin:anonymize-ua new ua Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 +0ms
puppeteer-extra-plugin:recaptcha solveRecaptchas +0ms
puppeteer-extra-plugin:recaptcha findRecaptchas +0ms
puppeteer-extra-plugin:recaptcha hasRecaptchaScriptTag false +0ms
puppeteer-extra-plugin:recaptcha _generateContentScript findRecaptchas undefined +0ms
puppeteer-extra-plugin:recaptcha findRecaptchas { captchas: [], error: null } +0ms
puppeteer-extra-plugin:recaptcha solveRecaptchas { captchas: [], solutions: [], solved: [], error: null } +0ms
Hmm, interesting. It doesn't seem to find the captcha in your screenshot.
I have trouble triggering the bot warning on that page π Are you able to paste the HTML of the page in your screenshot here?
using e.g.
let bodyHTML = await page.evaluate(() => document.body.innerHTML);
Also, could you paste the recaptcha plugin version you're using?
@berstend output of bodyHTML:
<div id="distilIdentificationBlock"> </div>
<div id="d__fFH" style="position: absolute !important; top: -5000px !important; left: -5000px !important;"><object id="d_dlg" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></object><span id="d__fF" style="font-family: Courier, serif !important; font-size: 72px !important; visibility: hidden;">The quick brown fox jumps over the lazy dog.</span></div>
I'm using the following versions:
"puppeteer": "^2.0.0",
"puppeteer-extra": "^2.1.6",
"puppeteer-extra-plugin-stealth": "^2.2.5",
"puppeteer-extra-plugin-recaptcha": "^3.0.7",
"puppeteer-extra-plugin-anonymize-ua": "^2.1.7",
Hmm, not sure this is the HTML we're looking for. π
clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b
seems to be a "Dialog Helper" for IE.
Looking at the screenshot again:
The color of the reCAPTCHA has shifted, which means it has been detected by the plugin. Could this be an issue with your 2captcha.com account? Did you set the token
correctly? :)
I will add functionality to test the provided 2captcha credentials in the future.
I just added a warning when the XXXXXXX
token from the example is used, in case that was your issue :) Also I just today updated the readme to make it clear that a 2captcha account + api key is required for the plugin to work.
Closing for now, please ping if the issue is a different one.
When I go to the following link in puppeteer headless session: https://www.gumtree.com/p/vans/mercedes-sprinter-313-cdi-lwb..-fridge-chiller-van..-%C2%A33495..-no-vat..-fsh..-07989464646..-1-owner-/1350359649
I get the following:
just using the puppeteer-extra-plugin-recaptcha plugin alone with solveRecaptchas did not bypass the captcha screen.
However, when I use both puppeteer-extra-plugin-recaptcha and puppeteer-extra-plugin-stealth plugins, it seems to bypass the captcha page but only a blank white page is printed. Any ideas?