增加 goToVerify 函数
This commit is contained in:
@@ -44,6 +44,11 @@ class Wogg20240929 extends WebApiBase {
|
||||
|
||||
backData.error = pro.error;
|
||||
let proData = pro.data;
|
||||
this.checkVerify(webUrl, proData);
|
||||
if (proData?.includes("js=slider")) {
|
||||
await goToVerify(webUrl);
|
||||
return JSON.stringify(backData);
|
||||
}
|
||||
if (proData) {
|
||||
const $ = cheerio.load(proData);
|
||||
let vodDetail = new VideoDetail();
|
||||
@@ -121,6 +126,7 @@ class Wogg20240929 extends WebApiBase {
|
||||
"---.html"
|
||||
);
|
||||
let repData = await req(searchUrl);
|
||||
this.checkVerify(searchUrl, repData.data);
|
||||
const $ = cheerio.load(repData.data);
|
||||
let items = $(".module-search-item");
|
||||
|
||||
@@ -140,6 +146,17 @@ class Wogg20240929 extends WebApiBase {
|
||||
return JSON.stringify(backData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否需要验证码
|
||||
* @param {string} webUrl
|
||||
* @param {any} data
|
||||
**/
|
||||
async checkVerify(webUrl, data) {
|
||||
if (typeof data === "string" && data.includes("js=slider")) {
|
||||
await goToVerify(webUrl);
|
||||
}
|
||||
}
|
||||
|
||||
combineUrl(url) {
|
||||
if (url === undefined) {
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user