can't use page.solveRecaptchas() or any other puppeteer-extra functions with TypeScript. Should we document this?
See original GitHub issueHi,
If you canāt use any puppeteer-extra
-specific function (e.g. page.solveRecaptchas
), please add the following to your tsconfig.json
:
"include": [
"./node_modules/puppeteer-extra/*.d.ts",
"./node_modules/puppeteer-extra-*/*.d.ts",
"./src"
]
Your code needs to be located inside ./src
. Adding the include
property in your tsconfig.json
will ignore the existing exclude
property.
It will include āambientā typescript files so that the TypeScript compiler (and langage server) can resolve puppeteer-extra
types.
I am not sure why I had to do this.
Here is my whole tsconfig.json
for reference purposes:
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2020",
"strictFunctionTypes": true,
"moduleResolution": "node"
},
"include": [
"./node_modules/puppeteer-extra/*.d.ts",
"./node_modules/puppeteer-extra-*/*.d.ts",
"./src"
]
}
I can create a wiki page if you think that it is appropriate, let me know and Iāll resort to my best english skill to create it š.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
puppeteer-extra-plugin-recaptcha - npm
A puppeteer -extra plugin to solve reCAPTCHAs and hCaptchas automatically.. Latest version: 3.6.6, last published: 6 months ago. Start using ...
Read more >puppeteer-extra-plugin-recaptcha doesn't work on crunchyroll ...
From the terminal response, it seems the plug in was unable to detect or solve the captcha. The Tidal login page does use...
Read more >Puppeteer error: An `executablePath` or `channel` must be ...
It seems like puppeteer-core now requires executablePath as mandatory. Try this: import bypass from './captcha/captchaBypasser.js'; importĀ ...
Read more >Puppeteer-extra NPM - npm.io
Solves reCAPTCHAs and hCaptchas automatically, using a single line of code: page.solveRecaptchas() . puppeteer-extra-plugin-adblocker. Very fast & efficientĀ ...
Read more >Web Scraping with a Headless Browser: A Puppeteer Tutorial
In this article, Toptal Freelance JavaScript Developer Nick Chikovani shows how easy it is to perform web scraping using a headless browser.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@prescience-data thanks!
Jāai bien peur š
@berstend Added some info on adding to ambient types:
https://github.com/berstend/puppeteer-extra/wiki/TypeScript-usage
@clouedoc
Je tāen prie, non!! š