@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.js
CHANGED
|
@@ -298,7 +298,7 @@ var ActorInfo = {
|
|
|
298
298
|
mode: "response",
|
|
299
299
|
prefix: "https://yb.tencent.com/s/",
|
|
300
300
|
xurl: [
|
|
301
|
-
"/api/
|
|
301
|
+
"/api/share/general_share",
|
|
302
302
|
"shareId"
|
|
303
303
|
]
|
|
304
304
|
}
|
|
@@ -6739,6 +6739,7 @@ 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;
|
|
6742
6743
|
|
|
6743
6744
|
// src/internals/captcha/qbot_chaptcha.js
|
|
6744
6745
|
var QBOT_CAPTCHA_TYPE = "30119";
|
|
@@ -6900,6 +6901,7 @@ async function solveCaptcha2(page, options = {}, dependencies = {}) {
|
|
|
6900
6901
|
}
|
|
6901
6902
|
throw lastError;
|
|
6902
6903
|
}
|
|
6904
|
+
var sloveCaptcha2 = solveCaptcha2;
|
|
6903
6905
|
|
|
6904
6906
|
// src/chaptcha.js
|
|
6905
6907
|
var logger13 = createInternalLogger("Captcha");
|
|
@@ -6911,8 +6913,12 @@ var DEFAULT_CAPTCHA_RECOGNITION_OPTIONS = Object.freeze({
|
|
|
6911
6913
|
apiUrl: "https://api.jfbym.com/api/YmServer/customApi"
|
|
6912
6914
|
});
|
|
6913
6915
|
var CAPTCHA_STRATEGIES = Object.freeze({
|
|
6914
|
-
bytedance:
|
|
6915
|
-
|
|
6916
|
+
bytedance: {
|
|
6917
|
+
sloveCaptcha
|
|
6918
|
+
},
|
|
6919
|
+
qbot: {
|
|
6920
|
+
sloveCaptcha: sloveCaptcha2
|
|
6921
|
+
}
|
|
6916
6922
|
});
|
|
6917
6923
|
var mergeDefinedOptions = (...sources) => {
|
|
6918
6924
|
const merged = {};
|
|
@@ -7044,21 +7050,27 @@ var callCaptchaRecognitionApi = async (requestParams = {}) => {
|
|
|
7044
7050
|
};
|
|
7045
7051
|
async function solveCaptchaWithStrategy(strategyName, page, options = {}) {
|
|
7046
7052
|
const strategy = CAPTCHA_STRATEGIES[strategyName];
|
|
7047
|
-
if (
|
|
7053
|
+
if (!strategy?.sloveCaptcha) {
|
|
7048
7054
|
throw new Error(`[Captcha] \u672A\u627E\u5230\u9A8C\u8BC1\u7801\u7B56\u7565\uFF1A${strategyName}`);
|
|
7049
7055
|
}
|
|
7050
7056
|
const resolvedOptions = mergeDefinedOptions(
|
|
7051
7057
|
DEFAULT_CAPTCHA_RECOGNITION_OPTIONS,
|
|
7052
7058
|
options
|
|
7053
7059
|
);
|
|
7054
|
-
return strategy(page, resolvedOptions, {
|
|
7060
|
+
return strategy.sloveCaptcha(page, resolvedOptions, {
|
|
7055
7061
|
callCaptchaRecognitionApi,
|
|
7056
7062
|
logger: logger13
|
|
7057
7063
|
});
|
|
7058
7064
|
}
|
|
7065
|
+
async function solveQbotCaptcha2(image, extra = [], token, options = {}) {
|
|
7066
|
+
return solveQbotCaptcha(image, extra, token, options, {
|
|
7067
|
+
callCaptchaRecognitionApi
|
|
7068
|
+
});
|
|
7069
|
+
}
|
|
7059
7070
|
var Captcha = {
|
|
7060
7071
|
useCaptchaMonitor,
|
|
7061
|
-
solveCaptchaWithStrategy
|
|
7072
|
+
solveCaptchaWithStrategy,
|
|
7073
|
+
solveQbotCaptcha: solveQbotCaptcha2
|
|
7062
7074
|
};
|
|
7063
7075
|
|
|
7064
7076
|
// src/mutation.js
|