-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
432 additions
and
347 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,4 +76,5 @@ typings/ | |
.fusebox/ | ||
|
||
package-lock.json | ||
dist/ | ||
dist/ | ||
index.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"trailingComma": "none", | ||
"tabWidth": 4, | ||
"semi": true, | ||
"printWidth": 140, | ||
"singleQuote": false | ||
"useTabs": true, | ||
"trailingComma": "none", | ||
"tabWidth": 4, | ||
"semi": true, | ||
"printWidth": 140, | ||
"singleQuote": false | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require("dotenv/config"); | ||
|
||
const puppeteer = require("puppeteer-extra"); | ||
const { default: RecaptchaPlugin, BuiltinSolutionProviders } = require("puppeteer-extra-plugin-recaptcha"); | ||
const CapMonsterProvider = require("./dist/index.cjs.js"); | ||
|
||
CapMonsterProvider.use(BuiltinSolutionProviders); | ||
|
||
puppeteer.use( | ||
RecaptchaPlugin({ | ||
provider: { | ||
id: "capmonster", | ||
token: process.env.CAPMONSTER_KEY | ||
}, | ||
visualFeedback: true | ||
}) | ||
); | ||
|
||
if (!process.env.CAPMONSTER_KEY) { | ||
console.error('\nCAPMONSTER_KEY not set in ".env"'); | ||
process.exit(); | ||
} | ||
|
||
// Change jest-puppeteer "puppeteer" to "puppeteer-extra" | ||
require.cache[require.resolve("puppeteer")] = require.cache[require.resolve("puppeteer-extra")]; | ||
|
||
module.exports = {}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
preset: "jest-puppeteer", | ||
verbose: true, | ||
testTimeout: 60000 | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,58 @@ | ||
{ | ||
"name": "puppeteer-extra-plugin-recaptcha-capmonster", | ||
"version": "1.0.4", | ||
"description": "A puppeteer-extra plugin that implements CapMonster support for puppeteer-extra-plugin-recaptcha.", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.ts", | ||
"scripts": { | ||
"build": "npm run build:tsc && npm run build:rollup", | ||
"build:tsc": "tsc --module commonjs", | ||
"build:rollup": "rollup -c rollup.config.ts" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [ | ||
"puppeteer", | ||
"puppeteer-extra", | ||
"puppeteer-extra-plugin", | ||
"puppeteer-extra-plugin-recaptcha", | ||
"puppeteer-extra-plugin-recaptcha-capmonster", | ||
"recaptcha", | ||
"hcaptcha", | ||
"captcha", | ||
"2captcha", | ||
"capmonster" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/notsapinho/puppeteer-extra-plugin-recaptcha-capmonster.git" | ||
}, | ||
"author": "notsapinho", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^22.0.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@rollup/plugin-typescript": "^8.3.3", | ||
"@types/debug": "^4.1.7", | ||
"@types/node": "^16.11.11", | ||
"rollup": "^2.75.6", | ||
"rollup-plugin-sourcemaps": "^0.4.2", | ||
"ts-node": "^10.8.1", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.27.2", | ||
"debug": "^4.3.4" | ||
}, | ||
"engines": { | ||
"node": ">=12.0.0" | ||
} | ||
"name": "puppeteer-extra-plugin-recaptcha-capmonster", | ||
"version": "1.0.5", | ||
"description": "A puppeteer-extra plugin that implements CapMonster support for puppeteer-extra-plugin-recaptcha.", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.ts", | ||
"scripts": { | ||
"build": "npm run build:tsc && npm run build:rollup", | ||
"build:tsc": "tsc --module commonjs", | ||
"build:rollup": "rollup -c rollup.config.ts" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [ | ||
"puppeteer", | ||
"puppeteer-extra", | ||
"puppeteer-extra-plugin", | ||
"puppeteer-extra-plugin-recaptcha", | ||
"puppeteer-extra-plugin-recaptcha-capmonster", | ||
"recaptcha", | ||
"hcaptcha", | ||
"captcha", | ||
"2captcha", | ||
"capmonster" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/notsapinho/puppeteer-extra-plugin-recaptcha-capmonster.git" | ||
}, | ||
"author": "notsapinho", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^22.0.0", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@rollup/plugin-typescript": "^8.3.3", | ||
"@types/debug": "^4.1.7", | ||
"@types/node": "^16.11.11", | ||
"@types/puppeteer": "^5.4.6", | ||
"dotenv": "^16.0.1", | ||
"jest": "^28.1.1", | ||
"jest-puppeteer": "^6.1.0", | ||
"puppeteer-extra-plugin-recaptcha": "^3.5.0", | ||
"puppeteer-extra-plugin-recaptcha-capmonster": "^1.0.5", | ||
"rollup": "^2.75.6", | ||
"ts-node": "^10.8.1", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.7.3" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.27.2", | ||
"debug": "^4.3.4" | ||
}, | ||
"engines": { | ||
"node": ">=12.0.0" | ||
} | ||
} |
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
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
Oops, something went wrong.