@empiricalrun/playwright-utils 0.40.0 → 0.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/captcha/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/captcha/index.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.solveRecaptcha = solveRecaptcha;
|
|
7
7
|
const dashboard_client_1 = require("@empiricalrun/dashboard-client");
|
|
8
8
|
const puppeteer_extra_plugin_recaptcha_1 = __importDefault(require("puppeteer-extra-plugin-recaptcha"));
|
|
9
|
-
const POLLING_INTERVAL =
|
|
10
|
-
const MAX_POLLING_TIME =
|
|
9
|
+
const POLLING_INTERVAL = 10_000;
|
|
10
|
+
const MAX_POLLING_TIME = 300_000;
|
|
11
11
|
function buildTask(captcha) {
|
|
12
12
|
const taskType = captcha._vendor === "hcaptcha"
|
|
13
13
|
? "HCaptchaTaskProxyless"
|
|
@@ -65,7 +65,7 @@ async function solveSingleViaProxy(apiClient, captcha) {
|
|
|
65
65
|
body: { endpoint: "/getTaskResult", body: { taskId } },
|
|
66
66
|
});
|
|
67
67
|
assertNoError(result);
|
|
68
|
-
if (result.status ===
|
|
68
|
+
if (result.status === "ready" && result.solution) {
|
|
69
69
|
const token = result.solution.gRecaptchaResponse || result.solution.token;
|
|
70
70
|
if (token) {
|
|
71
71
|
solution.text = token;
|