@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.cjs
CHANGED
|
@@ -6767,7 +6767,6 @@ async function solveCaptcha(page, options = {}, dependencies = {}) {
|
|
|
6767
6767
|
logger12.error(`\u91CD\u8BD5 ${config.maxRetries} \u6B21\u540E\uFF0C\u9A8C\u8BC1\u7801\u4ECD\u672A\u8BC6\u522B\u6210\u529F\u3002`);
|
|
6768
6768
|
return false;
|
|
6769
6769
|
}
|
|
6770
|
-
var sloveCaptcha = solveCaptcha;
|
|
6771
6770
|
|
|
6772
6771
|
// src/internals/captcha/qbot_chaptcha.js
|
|
6773
6772
|
var QBOT_CAPTCHA_TYPE = "30119";
|
|
@@ -6929,7 +6928,6 @@ async function solveCaptcha2(page, options = {}, dependencies = {}) {
|
|
|
6929
6928
|
}
|
|
6930
6929
|
throw lastError;
|
|
6931
6930
|
}
|
|
6932
|
-
var sloveCaptcha2 = solveCaptcha2;
|
|
6933
6931
|
|
|
6934
6932
|
// src/chaptcha.js
|
|
6935
6933
|
var logger13 = createInternalLogger("Captcha");
|
|
@@ -6941,12 +6939,8 @@ var DEFAULT_CAPTCHA_RECOGNITION_OPTIONS = Object.freeze({
|
|
|
6941
6939
|
apiUrl: "https://api.jfbym.com/api/YmServer/customApi"
|
|
6942
6940
|
});
|
|
6943
6941
|
var CAPTCHA_STRATEGIES = Object.freeze({
|
|
6944
|
-
bytedance:
|
|
6945
|
-
|
|
6946
|
-
},
|
|
6947
|
-
qbot: {
|
|
6948
|
-
sloveCaptcha: sloveCaptcha2
|
|
6949
|
-
}
|
|
6942
|
+
bytedance: solveCaptcha,
|
|
6943
|
+
qbot: solveCaptcha2
|
|
6950
6944
|
});
|
|
6951
6945
|
var mergeDefinedOptions = (...sources) => {
|
|
6952
6946
|
const merged = {};
|
|
@@ -7078,27 +7072,21 @@ var callCaptchaRecognitionApi = async (requestParams = {}) => {
|
|
|
7078
7072
|
};
|
|
7079
7073
|
async function solveCaptchaWithStrategy(strategyName, page, options = {}) {
|
|
7080
7074
|
const strategy = CAPTCHA_STRATEGIES[strategyName];
|
|
7081
|
-
if (
|
|
7075
|
+
if (typeof strategy !== "function") {
|
|
7082
7076
|
throw new Error(`[Captcha] \u672A\u627E\u5230\u9A8C\u8BC1\u7801\u7B56\u7565\uFF1A${strategyName}`);
|
|
7083
7077
|
}
|
|
7084
7078
|
const resolvedOptions = mergeDefinedOptions(
|
|
7085
7079
|
DEFAULT_CAPTCHA_RECOGNITION_OPTIONS,
|
|
7086
7080
|
options
|
|
7087
7081
|
);
|
|
7088
|
-
return strategy
|
|
7082
|
+
return strategy(page, resolvedOptions, {
|
|
7089
7083
|
callCaptchaRecognitionApi,
|
|
7090
7084
|
logger: logger13
|
|
7091
7085
|
});
|
|
7092
7086
|
}
|
|
7093
|
-
async function solveQbotCaptcha2(image, extra = [], token, options = {}) {
|
|
7094
|
-
return solveQbotCaptcha(image, extra, token, options, {
|
|
7095
|
-
callCaptchaRecognitionApi
|
|
7096
|
-
});
|
|
7097
|
-
}
|
|
7098
7087
|
var Captcha = {
|
|
7099
7088
|
useCaptchaMonitor,
|
|
7100
|
-
solveCaptchaWithStrategy
|
|
7101
|
-
solveQbotCaptcha: solveQbotCaptcha2
|
|
7089
|
+
solveCaptchaWithStrategy
|
|
7102
7090
|
};
|
|
7103
7091
|
|
|
7104
7092
|
// src/mutation.js
|