@skrillex1224/playwright-toolkit 3.0.57 → 3.0.58
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/browser.js +1 -1
- package/dist/browser.js.map +2 -2
- package/dist/index.cjs +18 -6
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +18 -6
- package/dist/index.js.map +3 -3
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -325,7 +325,7 @@ var ActorInfo = {
|
|
|
325
325
|
mode: "response",
|
|
326
326
|
prefix: "https://yb.tencent.com/s/",
|
|
327
327
|
xurl: [
|
|
328
|
-
"/api/
|
|
328
|
+
"/api/share/general_share",
|
|
329
329
|
"shareId"
|
|
330
330
|
]
|
|
331
331
|
}
|
|
@@ -6767,6 +6767,7 @@ 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;
|
|
6770
6771
|
|
|
6771
6772
|
// src/internals/captcha/qbot_chaptcha.js
|
|
6772
6773
|
var QBOT_CAPTCHA_TYPE = "30119";
|
|
@@ -6928,6 +6929,7 @@ async function solveCaptcha2(page, options = {}, dependencies = {}) {
|
|
|
6928
6929
|
}
|
|
6929
6930
|
throw lastError;
|
|
6930
6931
|
}
|
|
6932
|
+
var sloveCaptcha2 = solveCaptcha2;
|
|
6931
6933
|
|
|
6932
6934
|
// src/chaptcha.js
|
|
6933
6935
|
var logger13 = createInternalLogger("Captcha");
|
|
@@ -6939,8 +6941,12 @@ var DEFAULT_CAPTCHA_RECOGNITION_OPTIONS = Object.freeze({
|
|
|
6939
6941
|
apiUrl: "https://api.jfbym.com/api/YmServer/customApi"
|
|
6940
6942
|
});
|
|
6941
6943
|
var CAPTCHA_STRATEGIES = Object.freeze({
|
|
6942
|
-
bytedance:
|
|
6943
|
-
|
|
6944
|
+
bytedance: {
|
|
6945
|
+
sloveCaptcha
|
|
6946
|
+
},
|
|
6947
|
+
qbot: {
|
|
6948
|
+
sloveCaptcha: sloveCaptcha2
|
|
6949
|
+
}
|
|
6944
6950
|
});
|
|
6945
6951
|
var mergeDefinedOptions = (...sources) => {
|
|
6946
6952
|
const merged = {};
|
|
@@ -7072,21 +7078,27 @@ var callCaptchaRecognitionApi = async (requestParams = {}) => {
|
|
|
7072
7078
|
};
|
|
7073
7079
|
async function solveCaptchaWithStrategy(strategyName, page, options = {}) {
|
|
7074
7080
|
const strategy = CAPTCHA_STRATEGIES[strategyName];
|
|
7075
|
-
if (
|
|
7081
|
+
if (!strategy?.sloveCaptcha) {
|
|
7076
7082
|
throw new Error(`[Captcha] \u672A\u627E\u5230\u9A8C\u8BC1\u7801\u7B56\u7565\uFF1A${strategyName}`);
|
|
7077
7083
|
}
|
|
7078
7084
|
const resolvedOptions = mergeDefinedOptions(
|
|
7079
7085
|
DEFAULT_CAPTCHA_RECOGNITION_OPTIONS,
|
|
7080
7086
|
options
|
|
7081
7087
|
);
|
|
7082
|
-
return strategy(page, resolvedOptions, {
|
|
7088
|
+
return strategy.sloveCaptcha(page, resolvedOptions, {
|
|
7083
7089
|
callCaptchaRecognitionApi,
|
|
7084
7090
|
logger: logger13
|
|
7085
7091
|
});
|
|
7086
7092
|
}
|
|
7093
|
+
async function solveQbotCaptcha2(image, extra = [], token, options = {}) {
|
|
7094
|
+
return solveQbotCaptcha(image, extra, token, options, {
|
|
7095
|
+
callCaptchaRecognitionApi
|
|
7096
|
+
});
|
|
7097
|
+
}
|
|
7087
7098
|
var Captcha = {
|
|
7088
7099
|
useCaptchaMonitor,
|
|
7089
|
-
solveCaptchaWithStrategy
|
|
7100
|
+
solveCaptchaWithStrategy,
|
|
7101
|
+
solveQbotCaptcha: solveQbotCaptcha2
|
|
7090
7102
|
};
|
|
7091
7103
|
|
|
7092
7104
|
// src/mutation.js
|