mirror of
https://github.com/qist/tvbox.git
synced 2025-10-27 18:22:47 +00:00
update FM
This commit is contained in:
147
0827.json
147
0827.json
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"spider": "./jar/custom_spider.jar;md5;8f735b6bf0cda5984e8ec2c184fa9cd07",
|
||||
"spider": "./jar/custom_spider.jar;md5;a2204506315000174d11fe509f88259c",
|
||||
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
||||
"sites": [
|
||||
{
|
||||
@@ -32,7 +32,7 @@
|
||||
"key": "bili_open",
|
||||
"name": "哔哩(open)",
|
||||
"type": 3,
|
||||
"api": "https://raw.githubusercontent.com/FongMi/CatVodOpen/main/open/bili_open.js",
|
||||
"api": "./js/bili_open.js",
|
||||
"searchable": 1,
|
||||
"changeable": 0,
|
||||
"ext": {
|
||||
@@ -49,7 +49,7 @@
|
||||
"changeable": 0,
|
||||
"style": {
|
||||
"type": "rect",
|
||||
"ratio": 1.597
|
||||
"ratio": 1.433
|
||||
},
|
||||
"ext": {
|
||||
"json": "./json/chuqiuyu1.json",
|
||||
@@ -64,6 +64,18 @@
|
||||
"searchable": 1,
|
||||
"changeable": 1
|
||||
},
|
||||
{
|
||||
"key": "玩偶",
|
||||
"name": "玩偶",
|
||||
"type": 3,
|
||||
"api": "csp_Wogg",
|
||||
"searchable": 1,
|
||||
"changeable": 0,
|
||||
"ext": {
|
||||
"token": "http://127.0.0.1:9978/file/tvfan/token.txt",
|
||||
"filter": "./json/wogg.json"
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "星星",
|
||||
"name": "星星",
|
||||
@@ -85,7 +97,7 @@
|
||||
"key": "廠長",
|
||||
"name": "廠長",
|
||||
"type": 3,
|
||||
"api": "https://fongmi.cachefly.net/FongMi/CatVodOpen/main/open/czzy_open.js",
|
||||
"api": "./js/czzy_open.js",
|
||||
"searchable": 1,
|
||||
"changeable": 1
|
||||
},
|
||||
@@ -93,7 +105,7 @@
|
||||
"key": "愛看",
|
||||
"name": "愛看",
|
||||
"type": 3,
|
||||
"api": "https://fongmi.cachefly.net/FongMi/CatVodOpen/main/open/ikanbot_open.js",
|
||||
"api": "./js/ikanbot_open.js",
|
||||
"searchable": 1,
|
||||
"changeable": 1
|
||||
},
|
||||
@@ -101,7 +113,15 @@
|
||||
"key": "快看",
|
||||
"name": "快看",
|
||||
"type": 3,
|
||||
"api": "https://fongmi.cachefly.net/FongMi/CatVodOpen/main/open/kkys_open.js",
|
||||
"api": "./js/kkys_open.js",
|
||||
"searchable": 1,
|
||||
"changeable": 1
|
||||
},
|
||||
{
|
||||
"key": "暴風",
|
||||
"name": "暴風",
|
||||
"type": 1,
|
||||
"api": "https://bfzyapi.com/api.php/provide/vod/?ac=list",
|
||||
"searchable": 1,
|
||||
"changeable": 1
|
||||
},
|
||||
@@ -111,82 +131,7 @@
|
||||
"type": 0,
|
||||
"api": "https://cj.lziapi.com/api.php/provide/vod/at/xml/",
|
||||
"searchable": 1,
|
||||
"changeable": 1,
|
||||
"categories": [
|
||||
"国产动漫",
|
||||
"日韩动漫",
|
||||
"国产剧",
|
||||
"韩国剧",
|
||||
"日本剧",
|
||||
"电影片",
|
||||
"连续剧",
|
||||
"综艺片",
|
||||
"动漫片",
|
||||
"动作片",
|
||||
"喜剧片",
|
||||
"爱情片",
|
||||
"科幻片",
|
||||
"恐怖片",
|
||||
"剧情片",
|
||||
"战争片",
|
||||
"台湾剧",
|
||||
"香港剧",
|
||||
"欧美剧",
|
||||
"记录片",
|
||||
"海外剧",
|
||||
"泰国剧",
|
||||
"大陆综艺",
|
||||
"港台综艺",
|
||||
"日韩综艺",
|
||||
"欧美综艺",
|
||||
"欧美动漫",
|
||||
"港台动漫",
|
||||
"海外动漫",
|
||||
"体育",
|
||||
"足球",
|
||||
"篮球",
|
||||
"网球",
|
||||
"斯诺克"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "非凡",
|
||||
"name": "非凡",
|
||||
"type": 0,
|
||||
"api": "http://cj.ffzyapi.com/api.php/provide/vod/at/xml/",
|
||||
"searchable": 1,
|
||||
"changeable": 1,
|
||||
"categories": [
|
||||
"国产动漫",
|
||||
"日韩动漫",
|
||||
"国产剧",
|
||||
"韩国剧",
|
||||
"日本剧",
|
||||
"电影片",
|
||||
"连续剧",
|
||||
"综艺片",
|
||||
"动漫片",
|
||||
"动作片",
|
||||
"喜剧片",
|
||||
"爱情片",
|
||||
"科幻片",
|
||||
"恐怖片",
|
||||
"剧情片",
|
||||
"战争片",
|
||||
"香港剧",
|
||||
"欧美剧",
|
||||
"记录片",
|
||||
"台湾剧",
|
||||
"海外剧",
|
||||
"泰国剧",
|
||||
"大陆综艺",
|
||||
"港台综艺",
|
||||
"日韩综艺",
|
||||
"欧美综艺",
|
||||
"欧美动漫",
|
||||
"港台动漫",
|
||||
"海外动漫"
|
||||
]
|
||||
"changeable": 1
|
||||
},
|
||||
{
|
||||
"key": "櫻花",
|
||||
@@ -212,21 +157,14 @@
|
||||
"searchable": 1,
|
||||
"changeable": 1
|
||||
},
|
||||
{
|
||||
"key": "玩偶",
|
||||
"name": "玩偶",
|
||||
"type": 3,
|
||||
"api": "csp_Wogg",
|
||||
"searchable": 1,
|
||||
"changeable": 0
|
||||
},
|
||||
{
|
||||
"key": "七夜",
|
||||
"name": "七夜",
|
||||
"type": 3,
|
||||
"api": "csp_Dovx",
|
||||
"searchable": 1,
|
||||
"changeable": 0
|
||||
"changeable": 0,
|
||||
"ext": "http://127.0.0.1:9978/file/tvfan/token.txt"
|
||||
},
|
||||
{
|
||||
"key": "雲搜",
|
||||
@@ -234,7 +172,8 @@
|
||||
"type": 3,
|
||||
"api": "csp_UpYun",
|
||||
"searchable": 1,
|
||||
"changeable": 0
|
||||
"changeable": 0,
|
||||
"ext": "http://127.0.0.1:9978/file/tvfan/token.txt"
|
||||
},
|
||||
{
|
||||
"key": "盤搜",
|
||||
@@ -242,7 +181,8 @@
|
||||
"type": 3,
|
||||
"api": "csp_PanSou",
|
||||
"searchable": 1,
|
||||
"changeable": 0
|
||||
"changeable": 0,
|
||||
"ext": "http://127.0.0.1:9978/file/tvfan/token.txt"
|
||||
},
|
||||
{
|
||||
"key": "盤搜索",
|
||||
@@ -250,7 +190,8 @@
|
||||
"type": 3,
|
||||
"api": "csp_PanSearch",
|
||||
"searchable": 1,
|
||||
"changeable": 0
|
||||
"changeable": 0,
|
||||
"ext": "http://127.0.0.1:9978/file/tvfan/token.txt"
|
||||
},
|
||||
{
|
||||
"key": "找資源",
|
||||
@@ -259,7 +200,7 @@
|
||||
"api": "csp_Zhaozy",
|
||||
"searchable": 1,
|
||||
"changeable": 0,
|
||||
"ext": "影視天下第一$$$test2$$$test2"
|
||||
"ext": "http://127.0.0.1:9978/file/tvfan/token.txt$$$test2$$$test2"
|
||||
},
|
||||
{
|
||||
"key": "push_agent",
|
||||
@@ -267,7 +208,8 @@
|
||||
"type": 3,
|
||||
"api": "csp_Push",
|
||||
"searchable": 1,
|
||||
"changeable": 0
|
||||
"changeable": 0,
|
||||
"ext": "http://127.0.0.1:9978/file/tvfan/token.txt"
|
||||
}
|
||||
],
|
||||
"doh": [
|
||||
@@ -315,6 +257,15 @@
|
||||
}
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"name": "暴風",
|
||||
"hosts": [
|
||||
"bfzy"
|
||||
],
|
||||
"regex": [
|
||||
"#EXT-X-DISCONTINUITY\\r*\\n*#EXTINF:3,[\\s\\S]*?#EXT-X-DISCONTINUITY"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "星星",
|
||||
"hosts": [
|
||||
@@ -325,7 +276,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "量子廣告",
|
||||
"name": "量子",
|
||||
"hosts": [
|
||||
"vip.lz",
|
||||
"hd.lz"
|
||||
@@ -336,7 +287,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "非凡廣告",
|
||||
"name": "非凡",
|
||||
"hosts": [
|
||||
"vip.ffzy",
|
||||
"hd.ffzy"
|
||||
|
||||
Binary file not shown.
@@ -1,13 +1,12 @@
|
||||
// 自动从 地址发布页 获取&跳转url地址
|
||||
import { Crypto, load, _ } from './lib/cat.js';
|
||||
|
||||
let key = 'czzy';
|
||||
let host = 'https://www.czzy.site'; // 厂长地址发布页
|
||||
// let url = 'https://cz01.cc';
|
||||
let url = '';
|
||||
let url = 'https://cz01.cc';
|
||||
let siteKey = '';
|
||||
let siteType = 0;
|
||||
|
||||
const UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1';
|
||||
|
||||
const cookie = {};
|
||||
|
||||
async function request(reqUrl, referer, mth, data, hd) {
|
||||
@@ -49,15 +48,13 @@ async function request(reqUrl, referer, mth, data, hd) {
|
||||
async function init(cfg) {
|
||||
siteKey = cfg.skey;
|
||||
siteType = cfg.stype;
|
||||
let html = await request(host);
|
||||
url = html.match(/推荐访问<a href="(.*)"/)[1];
|
||||
console.debug('厂长跳转地址 =====>' + url); // js_debug.log
|
||||
}
|
||||
|
||||
async function home(filter) {
|
||||
let filterObj = {};
|
||||
const html = await request(url + '/movie_bt');
|
||||
const $ = load(html);
|
||||
const series = $('div#beautiful-taxonomy-filters-tax-movie_bt_series > a[cat-url*=movie_bt_series]');
|
||||
const tags = $('div#beautiful-taxonomy-filters-tax-movie_bt_tags > a');
|
||||
let tag = {
|
||||
key: 'tag',
|
||||
@@ -69,7 +66,6 @@ async function home(filter) {
|
||||
}),
|
||||
};
|
||||
tag['init'] = tag.value[0].v;
|
||||
const series = $('div#beautiful-taxonomy-filters-tax-movie_bt_series > a[cat-url*=movie_bt_series]');
|
||||
let classes = _.map(series, (s) => {
|
||||
let typeId = s.attribs['cat-url'];
|
||||
typeId = typeId.substring(typeId.lastIndexOf('/') + 1);
|
||||
@@ -137,6 +133,7 @@ async function detail(id) {
|
||||
const detail = $('ul.moviedteail_list > li');
|
||||
let vod = {
|
||||
vod_id: id,
|
||||
vod_name: $('div.moviedteail_tt > h1').text().trim(),
|
||||
vod_pic: $('div.dyimg img:first').attr('src'),
|
||||
vod_remarks: '',
|
||||
vod_content: stripHtmlTag($('div.yp_context').html()).trim(),
|
||||
|
||||
@@ -12,7 +12,6 @@ async function request(reqUrl, agentSp) {
|
||||
method: 'get',
|
||||
headers: {
|
||||
'User-Agent': agentSp || UA,
|
||||
'referer': url
|
||||
},
|
||||
});
|
||||
return res.content;
|
||||
@@ -55,22 +54,7 @@ async function home(filter) {
|
||||
}
|
||||
|
||||
async function homeVod() {
|
||||
const html = await request(url);
|
||||
const $ = load(html);
|
||||
const items = $('div.v-list a.item');
|
||||
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||
let videos = _.map(items, (item) => {
|
||||
const img = $(item).find('img:first')[0];
|
||||
return {
|
||||
vod_id: item.attribs.href,
|
||||
vod_name: img.attribs.alt,
|
||||
vod_pic: jsBase + base64Encode(img.attribs['data-src']),
|
||||
vod_remarks: '',
|
||||
};
|
||||
});
|
||||
return JSON.stringify({
|
||||
list: videos,
|
||||
});
|
||||
return '{}';
|
||||
}
|
||||
|
||||
async function category(tid, pg, filter, extend) {
|
||||
@@ -101,85 +85,50 @@ async function category(tid, pg, filter, extend) {
|
||||
}
|
||||
|
||||
async function detail(id) {
|
||||
const html = await request(url + id);
|
||||
const $ = load(html);
|
||||
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||
const detail = $('div.detail');
|
||||
const remarks = $('span#line-tips').text();
|
||||
let vod = {
|
||||
vod_id: id,
|
||||
vod_pic: jsBase + base64Encode($('div.item-root > img')[0].attribs['data-src']),
|
||||
vod_remarks: '',
|
||||
vod_content: remarks || '',
|
||||
vod_name: $(detail).find('h2').text().trim(),
|
||||
vod_year: $(detail).find('h3:nth-child(3)').text(),
|
||||
vod_area: $(detail).find('h3:nth-child(4)').text(),
|
||||
vod_actor: $(detail).find('h3:nth-child(5)').text(),
|
||||
};
|
||||
const res = await req(url + '/api/getResN?videoId=' + id.substring(id.lastIndexOf('/') + 1) + '&mtype=2', {
|
||||
headers: {
|
||||
Referer: 'play',
|
||||
'User-Agent': UA,
|
||||
},
|
||||
});
|
||||
const list = JSON.parse(res.content).data.list;
|
||||
let playlist = {};
|
||||
let arr = []
|
||||
for (const l of list) {
|
||||
const flagData = JSON.parse(l.resData);
|
||||
for (const f of flagData) {
|
||||
const from = f.flag;
|
||||
const urls = f.url;
|
||||
if (!from || !urls) continue;
|
||||
if (playlist[from]) continue;
|
||||
playlist[from] = urls;
|
||||
}
|
||||
}
|
||||
for (var key in playlist) {
|
||||
if ('kuaikan' == key) {
|
||||
arr.push({
|
||||
flag: '快看',
|
||||
url: playlist[key],
|
||||
sort: 1
|
||||
})
|
||||
} else if ('bfzym3u8' == key) {
|
||||
arr.push({
|
||||
flag: '暴风',
|
||||
url: playlist[key],
|
||||
sort: 2
|
||||
})
|
||||
} else if ('ffm3u8' == key) {
|
||||
arr.push({
|
||||
flag: '非凡',
|
||||
url: playlist[key],
|
||||
sort: 3
|
||||
})
|
||||
} else if ('lzm3u8' == key) {
|
||||
arr.push({
|
||||
flag: '量子',
|
||||
url: playlist[key],
|
||||
sort: 4
|
||||
})
|
||||
} else {
|
||||
arr.push({
|
||||
flag: key,
|
||||
url: playlist[key],
|
||||
sort: 5
|
||||
})
|
||||
}
|
||||
}
|
||||
arr.sort((a, b) => a.sort - b.sort);
|
||||
let playFrom = [];
|
||||
let playList = [];
|
||||
arr.map(val => {
|
||||
playFrom.push(val.flag);
|
||||
playList.push(val.url);
|
||||
})
|
||||
vod.vod_play_from = playFrom.join("$$$");
|
||||
vod.vod_play_url = playList.join("$$$");
|
||||
return JSON.stringify({
|
||||
list: [vod],
|
||||
});
|
||||
const html = await request(url + id);
|
||||
const $ = load(html);
|
||||
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||
const detail = $('div.detail > .meta');
|
||||
let vod = {
|
||||
vod_id: id,
|
||||
vod_pic: jsBase + base64Encode($('div.item-root > img')[0].attribs['data-src']),
|
||||
vod_remarks: '',
|
||||
};
|
||||
for (const info of detail) {
|
||||
if ($(info).hasClass('title')) {
|
||||
vod.vod_name = info.children[0].data;
|
||||
} else if ($(info).hasClass('year')) {
|
||||
vod.vod_area = info.children[0].data;
|
||||
} else if ($(info).hasClass('country')) {
|
||||
vod.vod_area = info.children[0].data;
|
||||
} else if ($(info).hasClass('celebrity')) {
|
||||
vod.vod_actor = info.children[0].data;
|
||||
}
|
||||
}
|
||||
|
||||
const res = await req(url + '/api/getResN?videoId=' + id.substring(id.lastIndexOf('/') + 1) + '&mtype=2', {
|
||||
headers: {
|
||||
Referer: url,
|
||||
'User-Agent': UA,
|
||||
},
|
||||
});
|
||||
const list = JSON.parse(res.content).data.list;
|
||||
let playlist = {};
|
||||
for (const l of list) {
|
||||
const flagData = JSON.parse(l.resData);
|
||||
for (const f of flagData) {
|
||||
const from = f.flag;
|
||||
const urls = f.url;
|
||||
if (!from || !urls) continue;
|
||||
if (playlist[from]) continue;
|
||||
playlist[from] = urls;
|
||||
}
|
||||
}
|
||||
vod.vod_play_from = _.keys(playlist).join('$$$');
|
||||
vod.vod_play_url = _.values(playlist).join('$$$');
|
||||
return JSON.stringify({
|
||||
list: [vod],
|
||||
});
|
||||
}
|
||||
|
||||
function base64Encode(text) {
|
||||
@@ -221,28 +170,21 @@ async function play(flag, id, flags) {
|
||||
});
|
||||
}
|
||||
|
||||
async function search(wd, quick, pg) {
|
||||
if (pg <= 0 || typeof(pg) == 'undefined') pg = 1;
|
||||
const html = await request(url + '/search?q=' + wd + '&p=' + pg);
|
||||
async function search(wd, quick) {
|
||||
const html = await request(url + '/search?q=' + wd);
|
||||
const $ = load(html);
|
||||
const items = $('div.media');
|
||||
const items = $('div.media > div.media-left > a');
|
||||
var jsBase = await js2Proxy(true, siteType, siteKey, 'img/', {});
|
||||
let videos = _.map(items, (item) => {
|
||||
const a = $(item).find('a:first')[0];
|
||||
const img = $(item).find('img:first')[0];
|
||||
const remarks = $($(item).find('span.label')[0]).text().trim();
|
||||
return {
|
||||
vod_id: a.attribs.href,
|
||||
vod_id: item.attribs.href,
|
||||
vod_name: img.attribs.alt,
|
||||
vod_pic: jsBase + base64Encode(img.attribs['data-src']),
|
||||
vod_remarks: remarks || '',
|
||||
vod_remarks: '',
|
||||
};
|
||||
});
|
||||
const hasMore = $('div.page-more > a:contains(下一页)').length > 0;
|
||||
const pgCount = hasMore ? parseInt(pg) + 1 : parseInt(pg);
|
||||
return JSON.stringify({
|
||||
page: parseInt(pg),
|
||||
pagecount: pgCount,
|
||||
list: videos,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -259,6 +259,10 @@ async function play(flag, id, flags) {
|
||||
var result = jsonParse(id, JSON.parse(res).data);
|
||||
if (result.url) {
|
||||
result.parse = 0;
|
||||
// demo of block hls ads
|
||||
if (/vip\.lz|hd\.lz/.test(result.url)) {
|
||||
result.url = await js2Proxy(true, siteType, siteKey, 'lzm3u8/' + base64Encode(result.url), {});
|
||||
}
|
||||
return JSON.stringify(result);
|
||||
}
|
||||
return JSON.stringify({
|
||||
@@ -275,6 +279,41 @@ async function play(flag, id, flags) {
|
||||
}
|
||||
}
|
||||
|
||||
async function proxy(segments, headers) {
|
||||
let what = segments[0];
|
||||
let url = base64Decode(segments[1]);
|
||||
if (what == 'lzm3u8') {
|
||||
const resp = await req(url, {});
|
||||
let hls = resp.content;
|
||||
const jsBase = await js2Proxy(false, siteType, siteKey, 'lzm3u8/', {});
|
||||
const baseUrl = url.substr(0, url.lastIndexOf('/') + 1);
|
||||
console.log(hls.length);
|
||||
hls = hls.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/, '');
|
||||
console.log(hls.length);
|
||||
hls = hls.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g, function (match, p1, p2, p3) {
|
||||
let up = (!p2.startsWith('http') ? baseUrl : '') + p2;
|
||||
return p1 + up + p3;
|
||||
});
|
||||
hls = hls.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g, function (match, p1, p2) {
|
||||
let up = (!p2.startsWith('http') ? baseUrl : '') + p2;
|
||||
return p1 + jsBase + base64Encode(up);
|
||||
});
|
||||
hls = hls.replace(/(#EXTINF:.*\n)(.*)/g, function (match, p1, p2) {
|
||||
let up = (!p2.startsWith('http') ? baseUrl : '') + p2;
|
||||
return p1 + up;
|
||||
});
|
||||
return JSON.stringify({
|
||||
code: resp.code,
|
||||
content: hls,
|
||||
headers: resp.headers,
|
||||
});
|
||||
}
|
||||
return JSON.stringify({
|
||||
code: 500,
|
||||
content: '',
|
||||
});
|
||||
}
|
||||
|
||||
async function search(wd, quick) {
|
||||
let data = JSON.parse(await request(url + '/api.php/Search/getSearch', { key: wd, type_id: 0, p: 1 })).data;
|
||||
let videos = [];
|
||||
@@ -291,6 +330,14 @@ async function search(wd, quick) {
|
||||
});
|
||||
}
|
||||
|
||||
function base64Encode(text) {
|
||||
return Crypto.enc.Base64.stringify(Crypto.enc.Utf8.parse(text));
|
||||
}
|
||||
|
||||
function base64Decode(text) {
|
||||
return Crypto.enc.Utf8.stringify(Crypto.enc.Base64.parse(text));
|
||||
}
|
||||
|
||||
const charStr = 'abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789';
|
||||
function randStr(len, withNum) {
|
||||
var _str = '';
|
||||
@@ -359,6 +406,7 @@ export function __jsEvalReturn() {
|
||||
category: category,
|
||||
detail: detail,
|
||||
play: play,
|
||||
proxy: proxy,
|
||||
search: search,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
1318
json/wogg.json
Normal file
1318
json/wogg.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user