feat(api): 更新 API 配置并添加新功能
- 将多个 API 的地址从 cloud.min.js 修改为 drpy2.min.js - 合并音海相关的多个 API,简化配置结构 - 添加盘搜和短剧全网搜索的新功能 - 新增全网短剧搜|虎斑 API,提供更全面的短剧搜索服务
This commit is contained in:
parent
8a967fa6b7
commit
db99ae41f4
65
api.json
65
api.json
@ -771,7 +771,7 @@
|
||||
"key": "双星",
|
||||
"name": "双星|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/双星.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
@ -781,7 +781,7 @@
|
||||
"key": "百酷",
|
||||
"name": "百酷|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/百酷.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
@ -791,7 +791,7 @@
|
||||
"key": "校长",
|
||||
"name": "校长|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/校长.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
@ -801,7 +801,7 @@
|
||||
"key": "天堂",
|
||||
"name": "天堂|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/天堂.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
@ -811,7 +811,7 @@
|
||||
"key": "人人电影网",
|
||||
"name": "人人|4K弹幕",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/人人电影网.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
@ -827,46 +827,19 @@
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "音海夸克",
|
||||
"name": "音海|夸克",
|
||||
"key": "音海",
|
||||
"name": "音海|搜索",
|
||||
"type": 3,
|
||||
"api": "csp_YinHaiQuark",
|
||||
"api": "csp_YinHai",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "音海UC",
|
||||
"name": "音海|UC",
|
||||
"key": "盘搜",
|
||||
"name": "盘搜|搜索",
|
||||
"type": 3,
|
||||
"api": "csp_YinHaiUC",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "音海天翼",
|
||||
"name": "音海|天翼",
|
||||
"type": 3,
|
||||
"api": "csp_YinHaiTianyi",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "音海123",
|
||||
"name": "音海|123",
|
||||
"type": 3,
|
||||
"api": "csp_YinHai123",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
},
|
||||
{
|
||||
"key": "音海百度",
|
||||
"name": "音海|百度",
|
||||
"type": 3,
|
||||
"api": "csp_YinHaiBaidu",
|
||||
"api": "csp_PanSou",
|
||||
"searchable": 1,
|
||||
"quickSearch": 1,
|
||||
"filterable": 1
|
||||
@ -881,7 +854,7 @@
|
||||
"key": "全盘",
|
||||
"name": "全盘|搜索",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/全盘.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
@ -1992,7 +1965,7 @@
|
||||
"key": "短剧合集",
|
||||
"name": "短剧|合集",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/短剧合集.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
@ -2002,12 +1975,22 @@
|
||||
"key": "短剧大全",
|
||||
"name": "短剧|大全",
|
||||
"type": 3,
|
||||
"api": "./js/cloud.min.js",
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/短剧大全.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "短剧全网",
|
||||
"name": "短剧|全网",
|
||||
"type": 3,
|
||||
"api": "./js/drpy2.min.js",
|
||||
"ext": "./js/短剧全网.js",
|
||||
"style": {
|
||||
"type": "list"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "AList",
|
||||
"name": "AList|合集",
|
||||
|
117
js/短剧全网.js
Normal file
117
js/短剧全网.js
Normal file
@ -0,0 +1,117 @@
|
||||
var rule = {
|
||||
title: '全网短剧搜|虎斑',
|
||||
siteurl: "http://xsayang.fun:14710",
|
||||
host: "http://127.0.0.1/",
|
||||
pic: "https://gimg3.baidu.com/search/src=http%3A%2F%2Fgips0.baidu.com%2Fit%2Fu%3D3826931526%2C1218106811%26fm%3D3030%26app%3D3030%26f%3DJPEG%3Fw%3D255%26h%3D170%26s%3D09A77732952477015C5349470200E0E2&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=f242,150&n=0&g=0n&q=100&fmt=auto?sec=1744995600&t=7adeeb1928d2f75b9dcf68740fff3e4c",
|
||||
baidupic: "https://img0.baidu.com/it/u=2646803025,2626552004&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500",
|
||||
detailUrl: 'fyid',
|
||||
searchUrl: '**',
|
||||
url: 'fyclass',
|
||||
searchable: 1,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 20000,
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
input = "push://" + input;
|
||||
}),
|
||||
double: false,
|
||||
推荐: '',
|
||||
一级: '',
|
||||
二级: $js.toString(() => {
|
||||
const parts = input.replace(rule.host + "/", "").split('~~');
|
||||
if (decodeURIComponent(parts[0]) == "网络") {
|
||||
const options = {
|
||||
method: 'POST',
|
||||
headers: {},
|
||||
body: {
|
||||
'url': urlencode(parts[2]),
|
||||
'title': decodeURIComponent(parts[1])
|
||||
}
|
||||
};
|
||||
let html = request(rule.siteurl + "/api/other/save_url", options)
|
||||
parts[2] = JSON.parse(html).data.url;
|
||||
}
|
||||
let picsm;
|
||||
if (parts[2].includes("baidu")) {
|
||||
picsm = rule.baidupic;
|
||||
} else {
|
||||
picsm = rule.pic;
|
||||
}
|
||||
let data = {
|
||||
vod_name: decodeURIComponent(parts[1]),
|
||||
vod_pic: picsm,
|
||||
vod_play_from: '推送',
|
||||
vod_play_url: "推送$" + parts[2]
|
||||
};
|
||||
VOD = data;
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
let html2 = request(rule.siteurl + "/api/other/web_search?title=" + input.replace(rule.host + "/", "") + "&is_type=2");
|
||||
// console.log(html);
|
||||
const strArray2 = html2.split('\n');
|
||||
for (const s of strArray2) {
|
||||
if (s.includes('data') && !s.includes('DONE')) {
|
||||
const jsonStr = s.replace(/^data:/, '');
|
||||
try {
|
||||
const js = JSON.parse(jsonStr);
|
||||
const name = js.title || '';
|
||||
const url = js.url || '';
|
||||
d.push({
|
||||
url: "网络" + "~~" + name + "~~" + url,
|
||||
title: name,
|
||||
img: rule.baidupic,
|
||||
})
|
||||
} catch (e) {
|
||||
console.error('解析JSON失败:', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let html1 = request(rule.siteurl + "/api/other/web_search?title=" + input.replace(rule.host + "/", "") + "&is_type=0");
|
||||
// console.log(html);
|
||||
const strArray = html1.split('\n');
|
||||
for (const s of strArray) {
|
||||
if (s.includes('data') && !s.includes('DONE')) {
|
||||
const jsonStr = s.replace(/^data:/, '');
|
||||
try {
|
||||
const js = JSON.parse(jsonStr);
|
||||
const name = js.title || '';
|
||||
const url = js.url || '';
|
||||
d.push({
|
||||
url: "网络" + "~~" + name + "~~" + url,
|
||||
title: name,
|
||||
img: rule.pic,
|
||||
})
|
||||
} catch (e) {
|
||||
console.error('解析JSON失败:', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let html = request(rule.siteurl + "/s/" + input.replace(rule.host + "/", ""), {})
|
||||
const regex = /copyText\(\$event,'([^']+)','([^']+)'/g;
|
||||
let matcher;
|
||||
while ((matcher = regex.exec(html)) !==
|
||||
null) {
|
||||
const title = matcher[1];
|
||||
const url = matcher[2];
|
||||
let picsm;
|
||||
if (url.includes("baidu")) {
|
||||
picsm = rule.baidupic;
|
||||
} else {
|
||||
picsm = rule.pic;
|
||||
}
|
||||
d.push({
|
||||
url: "本地" + "~~" + title + "~~" + url,
|
||||
title: title,
|
||||
img: picsm,
|
||||
})
|
||||
}
|
||||
|
||||
setResult(d)
|
||||
}),
|
||||
}
|
BIN
spider.jar
BIN
spider.jar
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user