@skrillex1224/playwright-toolkit 3.0.56 → 3.0.57
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/dist/index.cjs +5 -17
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +5 -17
- package/dist/index.js.map +3 -3
- package/index.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6739,7 +6739,6 @@ async function solveCaptcha(page, options = {}, dependencies = {}) {
|
|
|
6739
6739
|
logger12.error(`\u91CD\u8BD5 ${config.maxRetries} \u6B21\u540E\uFF0C\u9A8C\u8BC1\u7801\u4ECD\u672A\u8BC6\u522B\u6210\u529F\u3002`);
|
|
6740
6740
|
return false;
|
|
6741
6741
|
}
|
|
6742
|
-
var sloveCaptcha = solveCaptcha;
|
|
6743
6742
|
|
|
6744
6743
|
// src/internals/captcha/qbot_chaptcha.js
|
|
6745
6744
|
var QBOT_CAPTCHA_TYPE = "30119";
|
|
@@ -6901,7 +6900,6 @@ async function solveCaptcha2(page, options = {}, dependencies = {}) {
|
|
|
6901
6900
|
}
|
|
6902
6901
|
throw lastError;
|
|
6903
6902
|
}
|
|
6904
|
-
var sloveCaptcha2 = solveCaptcha2;
|
|
6905
6903
|
|
|
6906
6904
|
// src/chaptcha.js
|
|
6907
6905
|
var logger13 = createInternalLogger("Captcha");
|
|
@@ -6913,12 +6911,8 @@ var DEFAULT_CAPTCHA_RECOGNITION_OPTIONS = Object.freeze({
|
|
|
6913
6911
|
apiUrl: "https://api.jfbym.com/api/YmServer/customApi"
|
|
6914
6912
|
});
|
|
6915
6913
|
var CAPTCHA_STRATEGIES = Object.freeze({
|
|
6916
|
-
bytedance:
|
|
6917
|
-
|
|
6918
|
-
},
|
|
6919
|
-
qbot: {
|
|
6920
|
-
sloveCaptcha: sloveCaptcha2
|
|
6921
|
-
}
|
|
6914
|
+
bytedance: solveCaptcha,
|
|
6915
|
+
qbot: solveCaptcha2
|
|
6922
6916
|
});
|
|
6923
6917
|
var mergeDefinedOptions = (...sources) => {
|
|
6924
6918
|
const merged = {};
|
|
@@ -7050,27 +7044,21 @@ var callCaptchaRecognitionApi = async (requestParams = {}) => {
|
|
|
7050
7044
|
};
|
|
7051
7045
|
async function solveCaptchaWithStrategy(strategyName, page, options = {}) {
|
|
7052
7046
|
const strategy = CAPTCHA_STRATEGIES[strategyName];
|
|
7053
|
-
if (
|
|
7047
|
+
if (typeof strategy !== "function") {
|
|
7054
7048
|
throw new Error(`[Captcha] \u672A\u627E\u5230\u9A8C\u8BC1\u7801\u7B56\u7565\uFF1A${strategyName}`);
|
|
7055
7049
|
}
|
|
7056
7050
|
const resolvedOptions = mergeDefinedOptions(
|
|
7057
7051
|
DEFAULT_CAPTCHA_RECOGNITION_OPTIONS,
|
|
7058
7052
|
options
|
|
7059
7053
|
);
|
|
7060
|
-
return strategy
|
|
7054
|
+
return strategy(page, resolvedOptions, {
|
|
7061
7055
|
callCaptchaRecognitionApi,
|
|
7062
7056
|
logger: logger13
|
|
7063
7057
|
});
|
|
7064
7058
|
}
|
|
7065
|
-
async function solveQbotCaptcha2(image, extra = [], token, options = {}) {
|
|
7066
|
-
return solveQbotCaptcha(image, extra, token, options, {
|
|
7067
|
-
callCaptchaRecognitionApi
|
|
7068
|
-
});
|
|
7069
|
-
}
|
|
7070
7059
|
var Captcha = {
|
|
7071
7060
|
useCaptchaMonitor,
|
|
7072
|
-
solveCaptchaWithStrategy
|
|
7073
|
-
solveQbotCaptcha: solveQbotCaptcha2
|
|
7061
|
+
solveCaptchaWithStrategy
|
|
7074
7062
|
};
|
|
7075
7063
|
|
|
7076
7064
|
// src/mutation.js
|