mirror of
https://github.com/ls125781003/tvboxtg.git
synced 2025-12-12 07:02:18 +00:00
@@ -173,7 +173,7 @@
|
|||||||
"ratio": 1.77
|
"ratio": 1.77
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"key":"TGYunPan","name":"TG群组搜索","type":3,"api":"csp_TGYunPan","timeout":120,
|
{"key":"TGYunPan","name":"TG群组搜索","type":3,"api":"csp_TGYunPan","timeout":120,
|
||||||
"ext":{
|
"ext":{
|
||||||
"token":"./lib/tokenm.json",
|
"token":"./lib/tokenm.json",
|
||||||
"json":"./lib/tgsearch.json",
|
"json":"./lib/tgsearch.json",
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
"ratio": 1.77
|
"ratio": 1.77
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"key":"TGYunPan","name":"TG群组搜索","type":3,"api":"csp_TGYunPan","timeout":120,
|
{"key":"TGYunPan","name":"TG群组搜索","type":3,"api":"csp_TGYunPan","timeout":120,
|
||||||
"ext":{
|
"ext":{
|
||||||
"token":"./lib/tokenm.json",
|
"token":"./lib/tokenm.json",
|
||||||
"json":"./lib/tgsearch.json",
|
"json":"./lib/tgsearch.json",
|
||||||
|
|||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
e33b10e202795b1611d4ea69c01e3f3b
|
cd98eca4d35dc0ae49758c07294c558f
|
||||||
|
|||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
a6cf55ee092c0ce29548cf0324576aa6
|
ef1966ba8319fd4c63c1e94d7eb2f5b4
|
||||||
|
|||||||
@@ -25,7 +25,25 @@ cheerio.jinja2 = function (template, obj) {
|
|||||||
// import {gbkTool} from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/gbk.js'
|
// import {gbkTool} from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/libs/gbk.js'
|
||||||
|
|
||||||
let vercode = typeof (pdfl) === 'function' ? 'drpy2.1' : 'drpy2';
|
let vercode = typeof (pdfl) === 'function' ? 'drpy2.1' : 'drpy2';
|
||||||
const VERSION = vercode + ' 3.9.51beta5 20241014';
|
const VERSION = vercode + ' 3.9.51beta5 20241104';
|
||||||
|
const UpdateInfo = [
|
||||||
|
{
|
||||||
|
date: '20241104',
|
||||||
|
title: 'drpy更新,增加新特性',
|
||||||
|
version: '3.9.51beta5 20241104',
|
||||||
|
msg: `
|
||||||
|
1. rule增加 搜索验证标识 属性,可以不定义,默认为 '系统安全验证|请输入验证码'
|
||||||
|
2. rule增加 searchNoPage 属性,可以不定义,如果定义 1 将关闭该源的搜索翻页功能,超过1页直接返回空
|
||||||
|
`
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
function getUpdateInfo() {
|
||||||
|
return UpdateInfo.map((_o) => {
|
||||||
|
_o.msg = _o.msg.trim().split('\n').map(_it => _it.trim()).join('\n')
|
||||||
|
return _o
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function init_test() {
|
function init_test() {
|
||||||
// console.log(typeof(JSON5));
|
// console.log(typeof(JSON5));
|
||||||
@@ -1744,12 +1762,14 @@ function request(url, obj, ocr_flag) {
|
|||||||
obj.redirect = 0;
|
obj.redirect = 0;
|
||||||
}
|
}
|
||||||
if (obj.headers.hasOwnProperty('Content-Type') || obj.headers.hasOwnProperty('content-type')) {
|
if (obj.headers.hasOwnProperty('Content-Type') || obj.headers.hasOwnProperty('content-type')) {
|
||||||
if (obj.headers["Content-Type"].includes("application/x-www-form-urlencoded")) {
|
let _contentType = obj.headers["Content-Type"] || obj.headers["content-type"] || "";
|
||||||
log("body");
|
if (_contentType.includes("application/x-www-form-urlencoded")) {
|
||||||
|
log("custom body is application/x-www-form-urlencoded");
|
||||||
//console.log(JSON.stringify(obj));
|
//console.log(JSON.stringify(obj));
|
||||||
if (typeof obj.body == "string") {
|
if (typeof obj.body == "string") {
|
||||||
let temp_obj = parseQueryString(obj.body);
|
let temp_obj = parseQueryString(obj.body);
|
||||||
//obj.body = objectToQueryString(temp_obj);
|
//obj.body = objectToQueryString(temp_obj);
|
||||||
|
console.log(JSON.stringify(temp_obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2411,6 +2431,10 @@ function searchParse(searchObj) {
|
|||||||
if (!searchObj.searchUrl) {
|
if (!searchObj.searchUrl) {
|
||||||
return '{}'
|
return '{}'
|
||||||
}
|
}
|
||||||
|
if (rule.searchNoPage && Number(searchObj.pg) > 1) {
|
||||||
|
// 关闭搜索分页
|
||||||
|
return '{}'
|
||||||
|
}
|
||||||
let p = searchObj.搜索 === '*' && rule.一级 ? rule.一级 : searchObj.搜索;
|
let p = searchObj.搜索 === '*' && rule.一级 ? rule.一级 : searchObj.搜索;
|
||||||
if (!p || typeof (p) !== 'string') {
|
if (!p || typeof (p) !== 'string') {
|
||||||
return '{}'
|
return '{}'
|
||||||
@@ -2499,7 +2523,9 @@ function searchParse(searchObj) {
|
|||||||
html = getHtml(MY_URL);
|
html = getHtml(MY_URL);
|
||||||
}
|
}
|
||||||
if (html) {
|
if (html) {
|
||||||
if (/系统安全验证|输入验证码/.test(html)) {
|
// 解决搜索源码奇葩触发自动过验证逻辑
|
||||||
|
let search_tag = rule.搜索验证标识 || '系统安全验证|输入验证码';
|
||||||
|
if (new RegExp(search_tag).test(html)) {
|
||||||
let cookie = verifyCode(MY_URL);
|
let cookie = verifyCode(MY_URL);
|
||||||
if (cookie) {
|
if (cookie) {
|
||||||
console.log(`本次成功过验证,cookie:${cookie}`);
|
console.log(`本次成功过验证,cookie:${cookie}`);
|
||||||
|
|||||||
7
drpy_t3/drpy_libs/drpy2.min.js
vendored
7
drpy_t3/drpy_libs/drpy2.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -1 +1 @@
|
|||||||
e33b10e202795b1611d4ea69c01e3f3b
|
cd98eca4d35dc0ae49758c07294c558f
|
||||||
|
|||||||
Reference in New Issue
Block a user