{"id":28662,"date":"2026-11-27T05:01:04","date_gmt":"2026-11-27T05:01:04","guid":{"rendered":"https:\/\/capskip.com\/?p=28662"},"modified":"2026-11-27T05:01:04","modified_gmt":"2026-11-27T05:01:04","slug":"puppeteer-extra-plugin-recaptcha","status":"publish","type":"post","link":"https:\/\/capskip.com\/zh\/puppeteer-extra-plugin-recaptcha\/","title":{"rendered":"puppeteer-extra-plugin-recaptcha\uff1a\u5199\u4e00\u4e2a provider \u51fd\u6570"},"content":{"rendered":"<p>The plugin puppeteer-extra-plugin-recaptcha can use CapSkip as its solver without a hosts file edit or a certificate, because it accepts a provider function. You write about 45 lines that call <code>solver.recaptcha()<\/code> from the capskip package and hand the token back in the shape the plugin expects. After that, <code>page.solveRecaptchas()<\/code> finds the widget, calls your function, types the token into the page and runs the page callback. The solving happens in the <a href=\"https:\/\/capskip.com\/puppeteer-captcha-solver\/\">CapSkip Puppeteer solver<\/a> on a Windows PC you own, for a flat license, so a retry costs no fee.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">What you need<\/h2>\n<ul>\n<li>A Windows PC with CapSkip installed, following the <a href=\"https:\/\/capskip.com\/setup-guide\/\">setup guide<\/a>. CapSkip answers on 127.0.0.1:8080 on my PC, and I kept every task away from it. Every solve below ran against a stand-in of mine that speaks in.php and res.php, so each time and refusal is the stand-in&#8217;s rule, not CapSkip behavior.<\/li>\n<li>Node.js 22.12.0 at the least, because puppeteer 25.18.1 declares that in its engines field. The capskip package 1.8.0 asks for 18, puppeteer-extra 3.3.6 for 8 and the plugin for 9.11.2. On 20.11.1, npm only warned, and puppeteer-extra then printed Puppeteer is missing, because requiring Puppeteer 25 failed with ERR_REQUIRE_ESM.<\/li>\n<li>The packages from the first command below: puppeteer-extra-plugin-recaptcha 3.6.8, puppeteer-extra 3.3.6, puppeteer 25.18.1 (Chrome 157.0.8103.78) and capskip 1.8.0.<\/li>\n<li>A page with a reCAPTCHA you may automate. My test page loaded the real reCAPTCHA script with the v2 test key from the reCAPTCHA FAQ, and that script talks to Google by itself, as on any page. I sent no token to Google and called no verification endpoint. The tokens came from my stand-in and went only to it.<\/li>\n<li>An address for CapSkip, which you choose in the <a href=\"https:\/\/capskip.com\/setup-guide\/#connection-settings\">connection settings<\/a> section of the setup guide. In Local mode CapSkip answers on 127.0.0.1 and nowhere else; Server mode also answers other machines.<\/li>\n<\/ul>\n<p>The plugin is old: the npm registry shows 3.6.8 as published on 2023-03-01, with nothing newer. On Puppeteer 25.18.1 and Chrome 157 it still loaded and raised no warning in my runs.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"bash\" class=\"EnlighterJSRAW\"># In PowerShell, in a new empty folder\nnpm init -y\nnpm install puppeteer puppeteer-extra puppeteer-extra-plugin-recaptcha capskip<\/pre>\n<\/div>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Why the built-in provider cannot reach CapSkip<\/h2>\n<p>The plugin ships one provider. It is a small client on the https module of Node.js with the address of its own service written into the file, so no option moves it to 127.0.0.1:8080. CapSkip has a route for tools like that: pick a service in the Service Emulator setting and add a hosts file entry, and the app answers on port 443 with a certificate under a root certificate it installs in Windows. That edits system files and the trust store, so I did not run it. Per the <a href=\"https:\/\/nodejs.org\/api\/cli.html\" rel=\"noopener nofollow\" target=\"_blank\">Node.js command line docs<\/a>, Node.js trusts its bundled roots plus the PEM file named by NODE_EXTRA_CA_CERTS, read only at process start. The same docs list a flag called <code>use-system-ca<\/code>, written with two leading hyphens and added in v23.8.0, and a <code>NODE_USE_SYSTEM_CA<\/code> variable, added in v24.6.0 and v22.19.0, which add the system store, the Windows one here. I tested none of these. A provider function needs none of it.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Step 1: write the provider function<\/h2>\n<p>The plugin calls the function as <code>fn(captchas, token, opts)<\/code>, with the plugin itself as this. It reads two things back: <code>result.solutions<\/code>, one entry for each captcha it can type into the page, and an optional <code>result.error<\/code>. The fields of each captcha that matter, from the plugin source and from what it gave my function:<\/p>\n<table>\n<thead>\n<tr>\n<th>Field of a found captcha<\/th>\n<th>What it holds<\/th>\n<th>What the function does with it<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>captcha._vendor<\/code><\/td>\n<td>recaptcha or hcaptcha<\/td>\n<td>Picks the capskip method<\/td>\n<\/tr>\n<tr>\n<td><code>captcha.id<\/code><\/td>\n<td>The name the plugin gives the widget, cut from its iframe name<\/td>\n<td>Copied into the solution, so the plugin finds the widget again<\/td>\n<\/tr>\n<tr>\n<td><code>captcha.sitekey<\/code><\/td>\n<td>The key of the widget<\/td>\n<td>First argument of the call<\/td>\n<\/tr>\n<tr>\n<td><code>captcha.url<\/code><\/td>\n<td>The full page address, query string included<\/td>\n<td>Second argument of the call<\/td>\n<\/tr>\n<tr>\n<td><code>captcha.isEnterprise<\/code><\/td>\n<td>True when the iframe address has an enterprise path<\/td>\n<td>The enterprise option<\/td>\n<\/tr>\n<tr>\n<td><code>captcha.isInvisible<\/code><\/td>\n<td>True for size=invisible in the iframe address<\/td>\n<td>The invisible option<\/td>\n<\/tr>\n<tr>\n<td><code>captcha._type<\/code><\/td>\n<td>checkbox, invisible or score<\/td>\n<td>A score widget goes out as version v3<\/td>\n<\/tr>\n<tr>\n<td><code>captcha.s<\/code><\/td>\n<td>The data-s value, or null<\/td>\n<td>Sent only when present<\/td>\n<\/tr>\n<tr>\n<td><code>captcha.action<\/code><\/td>\n<td>The action of a v3 widget, if the page set one<\/td>\n<td>Sent for score widgets only<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A solution carries the captcha id and the token as <code>solution.text<\/code>. The hCaptcha half of the plugin types only solutions whose <code>solution.hasSolution<\/code> is true, so set it. Save the next block as capskip-provider.js. If CapSkip runs on another machine, change host to that machine.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\/\/ capskip-provider.js: a provider function for puppeteer-extra-plugin-recaptcha.\nconst { CapSkip } = require(&quot;capskip&quot;);\n\n\/\/ Local mode. For CapSkip on another machine, use its address as the host.\nconst solver = new CapSkip({ host: &quot;127.0.0.1&quot;, port: 8080 });\n\n\/\/ Turn what the plugin found into options for the capskip package.\nfunction recaptchaOptions(c) {\n  const options = { enterprise: c.isEnterprise ? 1 : 0 };\n  if (c._type === &quot;score&quot;) {\n    options.version = &quot;v3&quot;; \/\/ a hidden widget with no challenge frame\n    if (c.action) options.action = c.action;\n  } else {\n    if (c.isInvisible) options.invisible = 1;\n    if (c.s) options[&quot;data-s&quot;] = c.s;\n  }\n  return options;\n}\n\nasync function solveOne(c) {\n  const solution = { _vendor: c._vendor, id: c.id, provider: &quot;capskip&quot;, requestAt: new Date() };\n  try {\n    const result = c._vendor === &quot;hcaptcha&quot;\n      ? await solver.hcaptcha(c.sitekey, c.url)\n      : await solver.recaptcha(c.sitekey, c.url, recaptchaOptions(c));\n    if (!result.code) throw new Error(&quot;CapSkip answered with an empty token&quot;);\n    solution.providerCaptchaId = result.captchaId;\n    solution.text = result.code;\n    solution.hasSolution = true; \/\/ the hCaptcha part of the plugin reads it\n  } catch (err) {\n    solution.error = `${err.name}: ${err.message}`;\n  }\n  solution.responseAt = new Date();\n  solution.duration = (solution.responseAt - solution.requestAt) \/ 1000;\n  return solution;\n}\n\n\/\/ The plugin calls this as fn(captchas, token, opts), with the plugin as this.\nasync function capskipProvider(captchas) {\n  const all = await Promise.all(captchas.map(solveOne));\n  \/\/ Hand back only the solved ones: the plugin types every solution it gets into the page.\n  return { solutions: all.filter((s) =&gt; s.hasSolution), error: all.find((s) =&gt; s.error)?.error };\n}\n\nmodule.exports = { capskipProvider, solver };<\/pre>\n<\/div>\n<p>A v2 task that carries an action is refused before any request, with ValidationException, so the function sends the action for score widgets only. The recaptcha method takes no user agent either, so the headless user agent never reaches CapSkip. On a hand-made page with an enterprise widget, an invisible widget with an open challenge frame, a score widget with an action and a widget with a data-s value, the function sent enterprise 1, invisible 1, version v3 with the action, and the data-s value. A hand-made hCaptcha entry went out as the hcaptcha method. I wrote that page, so the enterprise and v3 scripts of Google stay untested.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Step 2: plug it in and solve<\/h2>\n<p>Save this as signup.js beside the first file. Set SIGNUP_URL to your own page and the submit selector to your own button.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\/\/ signup.js: puppeteer-extra, the reCAPTCHA plugin and CapSkip as its provider.\nconst puppeteer = require(&quot;puppeteer-extra&quot;);\nconst RecaptchaPlugin = require(&quot;puppeteer-extra-plugin-recaptcha&quot;);\nconst { capskipProvider } = require(&quot;.\/capskip-provider&quot;);\n\nconst SIGNUP_URL = &quot;https:\/\/example.com\/signup&quot;; \/\/ a page with a reCAPTCHA you may automate\nconst SIZE = 2; \/\/ tabs at once: keep it at or below Max. Threads for reCAPTCHA in CapSkip\n\npuppeteer.use(RecaptchaPlugin({\n  provider: { fn: capskipProvider },\n  visualFeedback: false,\n  throwOnError: true,\n}));\n\nasync function signUp(browser, url) {\n  const page = await browser.newPage();\n  try {\n    await page.goto(url);\n    const { captchas, solved } = await page.solveRecaptchas(); \/\/ throws on an error\n    const entered = solved.filter((s) =&gt; s.isSolved).length;\n    \/\/ An empty result is not an error to the plugin, so check the counts yourself.\n    if (captchas.length === 0 || entered &lt; captchas.length) {\n      throw new Error(`found ${captchas.length} captchas, entered ${entered}`);\n    }\n    await Promise.all([page.waitForNavigation(), page.click(&quot;button[type=submit]&quot;)]);\n    return await page.evaluate(() =&gt; document.body.innerText);\n  } finally {\n    await page.close();\n  }\n}\n\n(async () =&gt; {\n  const urls = process.argv.length &gt; 2 ? process.argv.slice(2) : [SIGNUP_URL];\n  const browser = await puppeteer.launch(); \/\/ headless, the default\n  try {\n    for (let i = 0; i &lt; urls.length; i += SIZE) {\n      const batch = urls.slice(i, i + SIZE);\n      const results = await Promise.allSettled(batch.map((u) =&gt; signUp(browser, u)));\n      results.forEach((r, j) =&gt; {\n        console.log(batch[j], r.status === &quot;fulfilled&quot; ? r.value : `FAIL ${r.reason.message}`);\n      });\n    }\n  } finally {\n    await browser.close();\n  }\n})();<\/pre>\n<\/div>\n<div data-no-translation>\n<pre data-enlighter-language=\"bash\" class=\"EnlighterJSRAW\"># PowerShell, in the same folder: one page, the address in SIGNUP_URL\nnode signup.js\n# or several pages, SIZE at a time\nnode signup.js https:\/\/example.com\/signup?a=1 https:\/\/example.com\/signup?a=2<\/pre>\n<\/div>\n<p>Set SIGNUP_URL first, because the example.com default prints a FAIL line saying found 0 captchas. Addresses after the file name replace it, and the script visits each. Against my stand-in site it printed the page address and then accepted, on Node.js 24.22.0 and 25.2.1. The stand-in site accepts a token its CapSkip issued, once. Eighteen runs took 5.9 to 7.9 seconds in total, with the stand-in ready after 2 seconds. The solve call itself returned after 3.8 seconds, because the SDK polls at 0, 0.25, 0.75, 1.75 and 3.75 seconds, and the stand-in was ready between the fourth poll and the fifth.<\/p>\n<p>The call wraps three page methods that you can also run one by one, with the same result: findRecaptchas, getRecaptchaSolutions and enterRecaptchaSolutions. It returns this:<\/p>\n<table>\n<thead>\n<tr>\n<th>Key of the result<\/th>\n<th>Holds<\/th>\n<th>In the run above<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>result.captchas<\/code><\/td>\n<td>The widgets the plugin will solve<\/td>\n<td>One checkbox widget<\/td>\n<\/tr>\n<tr>\n<td><code>result.filtered<\/code><\/td>\n<td>Widgets it found and skipped, each with filteredReason<\/td>\n<td>Empty<\/td>\n<\/tr>\n<tr>\n<td><code>result.solutions<\/code><\/td>\n<td>What your function returned<\/td>\n<td>One entry, the token, the duration and a providerCaptchaId<\/td>\n<\/tr>\n<tr>\n<td><code>result.solved<\/code><\/td>\n<td>What it typed, with isSolved, responseElement and responseCallback<\/td>\n<td>isSolved and responseElement true, responseCallback false because this page has no callback<\/td>\n<\/tr>\n<tr>\n<td><code>result.error<\/code><\/td>\n<td>A string when your function reports one, otherwise nothing<\/td>\n<td>Nothing<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Headless or headful made no difference: the default headless mode, the shell mode and headless set to false all got the form accepted. With visualFeedback on, the plugin put a CSS filter on the widget iframe, so I set it to false.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Options, failures and retries<\/h2>\n<h3 style=\"font-size:1.3rem;line-height:1.4;\">What the options filter<\/h3>\n<p>Three options decide which widgets reach your function, and a fourth decides how errors come back. A skipped widget lands in <code>result.filtered<\/code> with the option named in filteredReason, and no task goes to CapSkip.<\/p>\n<table>\n<thead>\n<tr>\n<th>Option, default false<\/th>\n<th>Skips<\/th>\n<th>What I saw<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>solveInViewportOnly<\/td>\n<td>Checkbox widgets outside the viewport (source: invisible ones are not tested)<\/td>\n<td>A widget below a 3000 pixel spacer: solved with false, skipped with true and no task sent<\/td>\n<\/tr>\n<tr>\n<td>solveScoreBased<\/td>\n<td>Hidden widgets with no challenge frame, the shape of v3<\/td>\n<td>On the hand-made page: skipped by default, and with true the function got it with its action<\/td>\n<\/tr>\n<tr>\n<td>solveInactiveChallenges<\/td>\n<td>Invisible widgets whose challenge popup is not active<\/td>\n<td>With the real script it never skipped one, see below<\/td>\n<\/tr>\n<tr>\n<td>throwOnError<\/td>\n<td>Nothing. It makes the plugin throw instead of returning an error string<\/td>\n<td>See the failure cases<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>An invisible v2 widget is a trap. With the real reCAPTCHA script and the test key, the plugin usually called the widget score based and skipped it when it looked straight after the page load: in 50 of 60 runs on Node.js 24.22.0 and 55 of 60 on 25.2.1, with the rest passing it as an invisible widget. After a 2 second wait it called the widget invisible, with an active challenge, in 10 of 10 runs on each version, and waiting for the challenge frame, as below, passed 30 of 30 on each. The plugin decides from whether that frame exists yet, and it appears a moment after the script runs. The page callback then submits the form, so the script waits for a result element instead of clicking. Make two edits in signUp, which passed three runs on each Node.js version:<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\/\/ Edit 1: right after page.goto(url) and before page.solveRecaptchas()\nawait page.waitForSelector('iframe[src*=\"\/recaptcha\/api2\/bframe\"]'); \/\/ the challenge frame\n\n\/\/ Edit 2: instead of the Promise.all line that clicks the button\nawait page.waitForSelector(&quot;#verdict&quot;); \/\/ use your own success element: the page callback submitted the form<\/pre>\n<\/div>\n<h3 style=\"font-size:1.3rem;line-height:1.4;\">When your function fails<\/h3>\n<p>The plugin sets no timer around your function, so a silent CapSkip holds <code>page.solveRecaptchas()<\/code> until the capskip package gives up. The package default is 300 seconds (source), and the setup guide gives the reCAPTCHA row a Row Timeout of 250 seconds, so CapSkip should end a stuck solve first. With the recaptchaTimeout option at 5 and a stand-in that never answered, TimeoutException came after 7.80 seconds, and with 12 after 12.81 seconds, because the package checks its clock only after each wait (Node.js 24.22.0).<\/p>\n<p>What the plugin does with a failure depends on what your function returns. I ran several shapes with throwOnError off and on. A provider error also prints a warning line to the console.<\/p>\n<table>\n<thead>\n<tr>\n<th>What the function does<\/th>\n<th>throwOnError false<\/th>\n<th>throwOnError true<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Throws, or returns undefined, or returns no solutions key<\/td>\n<td>result.error holds the text, nothing typed<\/td>\n<td>The call throws, nothing typed<\/td>\n<\/tr>\n<tr>\n<td>Returns an empty solutions array and no error<\/td>\n<td>No error and nothing typed: solved is empty<\/td>\n<td>Does not throw either<\/td>\n<\/tr>\n<tr>\n<td>Returns a solution that has an error and no text<\/td>\n<td>Types the word undefined into the response field, runs the callback with undefined and reports isSolved true<\/td>\n<td>Throws before it types<\/td>\n<\/tr>\n<tr>\n<td>The function above: solved ones only, error text for the rest<\/td>\n<td>Types the solved ones, and result.error holds the first failure: three of four widgets were filled<\/td>\n<td>Throws before it types, so the solved tokens of that call are lost: on the hand-made page, with one of four widgets failing, three tokens were wasted<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The thrown message starts with Error: Error:, because the plugin wraps its own error text again. The empty array row is why signup.js compares the counts itself, and the third row is why the function drops failed solutions before it returns. ERROR_CAPTCHA_UNSOLVABLE and ERROR_GOOGLEKEY, simulated by the stand-in, came out as ApiException text in result.error. A solution with an error and no text, or with an unknown id, gave an object, so the text ended in [object Object].<\/p>\n<h3 style=\"font-size:1.3rem;line-height:1.4;\">One token, one submit: retries and tabs<\/h3>\n<p>A reCAPTCHA token is good once, and briefly; see the <a href=\"https:\/\/capskip.com\/recaptcha-token-expiration\/\">token expiration guide<\/a>. The plugin has no retry and no cache. Calling <code>page.solveRecaptchas()<\/code> twice on one page sent two tasks to my stand-in, the second token replaced the first, and the stand-in site accepted one form post. So solve right before the click, and after a refused form post load the page again and solve again.<\/p>\n<p>Tabs call your function at the same time, and so do the widgets of one page. With SIZE edited to 4, four tabs put four tasks in flight at the stand-in and took 6.2 to 6.6 seconds. With SIZE at 2, as written, no more than 2 ran at once and the same tabs took 10.5 to 11.0 seconds, and with SIZE at 1 they took 18.4 to 19.0. Six tabs with SIZE 3 peaked at 3 (Node.js 24.22.0 and 25.2.1). A page with four widgets sent four tasks at once. The setup guide describes Max. Threads in the reCAPTCHA row of CapSkip as how many tasks it solves at once, with the others waiting up to the Wait Timeout, a queue I did not test. The capskip clock starts at the submit, so a wait counts against it: set SIZE no higher than Max. Threads. For a crawl with a queue and retry limits, see the <a href=\"https:\/\/capskip.com\/puppeteer-cluster-captcha\/\">puppeteer-cluster guide<\/a>.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Server mode: the plugin on one machine, CapSkip on another<\/h2>\n<p>CapSkip can run as a server on a Windows machine you control. Point host in capskip-provider.js at that machine, then switch the mode in the <a href=\"https:\/\/capskip.com\/setup-guide\/#connection-settings\">connection settings<\/a>, a step for which the setup guide says CapSkip must run as administrator. No second machine took part in my tests. Starting Server mode makes CapSkip add a rule that lets every address reach its port. To narrow that, add a Windows Firewall block rule for the addresses you do not expect, because a block rule beats an allow rule. Also turn on API Key Validation in CapSkip, and pass your own key as the apiKey option of the CapSkip constructor.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Common errors<\/h2>\n<p>A row marked seen was reproduced against my stand-in. The CapSkip error codes are listed in the API docs on the CapSkip site.<\/p>\n<table>\n<thead>\n<tr>\n<th>What you see<\/th>\n<th>Cause<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Please provide a solution provider to the plugin.<\/td>\n<td>The plugin got neither provider.fn nor a token (seen)<\/td>\n<td>Pass provider: { fn: capskipProvider }<\/td>\n<\/tr>\n<tr>\n<td>found 0 captchas<\/td>\n<td>The widget is not drawn yet, it sits in an iframe, or it is an invisible widget looked at before its challenge frame exists (see above). The plugin waits up to 10 seconds for a client only when a reCAPTCHA script tag is already on the page (source)<\/td>\n<td>Wait for the widget first. For an iframe, the README says to call frame.solveRecaptchas() on each child frame (not tested)<\/td>\n<\/tr>\n<tr>\n<td>The widget is in result.filtered<\/td>\n<td>An option skipped it (seen)<\/td>\n<td>Read filteredReason and change that option<\/td>\n<\/tr>\n<tr>\n<td>ValidationException<\/td>\n<td>The capskip package refused the options before any request (seen)<\/td>\n<td>The message names the option. Do not retry<\/td>\n<\/tr>\n<tr>\n<td>ERROR_CAPTCHA_UNSOLVABLE<\/td>\n<td>The solve failed (simulated by the stand-in)<\/td>\n<td>Load the page and solve again<\/td>\n<\/tr>\n<tr>\n<td>ERROR_GOOGLEKEY<\/td>\n<td>CapSkip did not accept the sitekey (simulated)<\/td>\n<td>Check the key the plugin found. A retry fails the same way<\/td>\n<\/tr>\n<tr>\n<td>ERROR_KEY_DOES_NOT_EXIST<\/td>\n<td>API Key Validation is on in CapSkip and the client sent the default key (stand-in rule)<\/td>\n<td>Pass your own key as apiKey in the CapSkip constructor<\/td>\n<\/tr>\n<tr>\n<td>TimeoutException<\/td>\n<td>No token before recaptchaTimeout, noticed after the next wait (seen)<\/td>\n<td>Look at the CapSkip Monitor, or raise the limit<\/td>\n<\/tr>\n<tr>\n<td>NetworkException saying connect ECONNREFUSED<\/td>\n<td>Nothing listens at that host and port (seen)<\/td>\n<td>Start CapSkip, or fix host and port<\/td>\n<\/tr>\n<tr>\n<td>The response field says undefined<\/td>\n<td>A custom function returned a solution without text (seen)<\/td>\n<td>Return only solved entries<\/td>\n<\/tr>\n<tr>\n<td>A form post the site refuses<\/td>\n<td>A token used before, or an older one<\/td>\n<td>Solve once per submit, right before the click<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">FAQ<\/h2>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Is puppeteer-extra-plugin-recaptcha still maintained?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Its last npm release is 3.6.8 from 2023-03-01 (see the <a href=\"https:\/\/github.com\/berstend\/puppeteer-extra\/tree\/master\/packages\/puppeteer-extra-plugin-recaptcha\" rel=\"noopener nofollow\" target=\"_blank\">project README<\/a>). It worked in my runs on Puppeteer 25.18.1 against one page with the real script. If detection breaks, read the sitekey yourself and call <code>solver.recaptcha()<\/code> directly.<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Does the plugin handle reCAPTCHA v3?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">It can hand your function a score based widget when solveScoreBased is on, and the function above sends it as version v3. I could not test that against a real v3 page, since I used only the v2 test key. A v3 page usually reads its token from its own script call, not a response field, so the direct route in the <a href=\"https:\/\/capskip.com\/recaptcha-v3-nodejs\/\">reCAPTCHA v3 in Node.js guide<\/a> is safer.<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Does this work with playwright-extra too?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">The package lists playwright-extra as an optional peer dependency. I tested only Puppeteer, and the provider function has no Puppeteer code in it.<\/p>\n<\/details>\n<p>With puppeteer-extra-plugin-recaptcha the only new part is one provider function, and it hands every widget to a <a href=\"https:\/\/capskip.com\/\">local captcha solver<\/a> that runs on your own Windows PC and bills nothing per solve. For other CAPTCHA types from Node.js, see the <a href=\"https:\/\/capskip.com\/nodejs-captcha-solver\/\">Node.js CAPTCHA solver page<\/a>, and for the browser side the <a href=\"https:\/\/capskip.com\/puppeteer-captcha-solver\/\">Puppeteer CAPTCHA solver page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63d2\u4ef6\u63a5\u53d7\u4e00\u4e2a provider \u51fd\u6570\uff0c\u6240\u4ee5 CapSkip \u4e0d\u9700\u8981\u4fee\u6539 hosts \u6587\u4ef6\uff0c\u4e5f\u4e0d\u9700\u8981\u8bc1\u4e66\u3002\u672c\u6587\u4f1a\u5199\u51fa\u8fd9\u4e2a\u51fd\u6570\uff0c\u628a\u5b83\u63a5\u8fdb\u53bb\uff0c\u5e76\u6d4b\u8bd5\u5404\u4e2a\u9009\u9879\u3001\u5931\u8d25\u3001\u91cd\u8bd5\u548c\u6807\u7b7e\u9875\u3002<\/p>","protected":false},"author":1,"featured_media":28661,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"puppeteer-extra-plugin-recaptcha: CapSkip Provider | CapSkip","rank_math_description":"puppeteer-extra-plugin-recaptcha takes a custom provider. Write one function that calls CapSkip, pass it as provider.fn and run page.solveRecaptchas().","rank_math_focus_keyword":"puppeteer-extra-plugin-recaptcha","footnotes":""},"categories":[70],"tags":[],"class_list":["post-28662","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-captcha"],"_links":{"self":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/comments?post=28662"}],"version-history":[{"count":1,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28662\/revisions"}],"predecessor-version":[{"id":28665,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28662\/revisions\/28665"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media\/28661"}],"wp:attachment":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media?parent=28662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/categories?post=28662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/tags?post=28662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}