0101-2132

fix
This commit is contained in:
Liu
2025-01-02 02:58:43 +08:00
parent acb66cd63d
commit db9d3bb3d8
14 changed files with 146 additions and 98 deletions

View File

@@ -189,6 +189,7 @@
"ratio": 1.77
}
},
{"key":"Guanying","name":"观影|网盘|磁力","type":3,"api":"csp_Guanying","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://www.gyg.la$$$noproxy$$$1$$$./lib/guanying.txt"},
{"key":"Wogg","name":"玩偶哥哥|网盘","type":3,"api":"csp_Wogg","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://wogg.888484.xyz/$$$noproxy$$$1$$$./lib/wogg.json$$$WOGG"},
{"key":"Wobg","name":"玩偶表哥|网盘","type":3,"api":"csp_Wobg","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://wobge.run.goorm.io$$$proxy$$$1$$$./lib/wogg.json$$$WOBG"},
{"key":"yydsys","name":"玩你老哥|网盘","type":3,"api":"csp_Wobg","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://tv.yydsys.top/$$$proxy$$$1$$$./lib/wogg.json$$$WNLG"},
@@ -689,14 +690,6 @@
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "肥羊TPTV",
"type": 0,
"url": "http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/tptv.m3u",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "肥羊B站直播",
"type": 0,
@@ -748,7 +741,7 @@
{
"name": "Gather.MyTV",
"type": 0,
"url": "https://tv.iill.top/m3u/MyTV",
"url": "http://127.0.0.1:10079/c/60/proxy/https://tv.iill.top/m3u/MyTV",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
@@ -826,17 +819,17 @@
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "fmm.live.ipv6",
"name": "fmm.live.ipv6.m3u",
"type": 0,
"url": "http://127.0.0.1:10079/c/3600/proxy/https://fanmingming.com/txt?url=https://live.fanmingming.com/tv/m3u/ipv6.m3u",
"url": "http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/ipv6.m3u",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "fmm.live.ipv6.m3u",
"name": "fmm.live.ipv6",
"type": 0,
"url": "http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.com/tv/m3u/ipv6.m3u",
"url": "http://127.0.0.1:10079/c/3600/proxy/https://fanmingming.cn/txt?url=https://live.fanmingming.cn/tv/m3u/ipv6.m3u",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"

View File

@@ -189,6 +189,7 @@
"ratio": 1.77
}
},
{"key":"Guanying","name":"观影|网盘|磁力","type":3,"api":"csp_Guanying","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://www.gyg.la$$$noproxy$$$1$$$./lib/guanying.txt"},
{"key":"Wogg","name":"玩偶哥哥|网盘","type":3,"api":"csp_Wogg","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://wogg.888484.xyz/$$$noproxy$$$1$$$./lib/wogg.json$$$WOGG"},
{"key":"Wobg","name":"玩偶表哥|网盘","type":3,"api":"csp_Wobg","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://wobge.run.goorm.io$$$proxy$$$1$$$./lib/wogg.json$$$WOBG"},
{"key":"yydsys","name":"玩你老哥|网盘","type":3,"api":"csp_Wobg","quickSearch":1, "changeable":1, "filterable":1, "timeout":60, "ext":"./lib/tokenm.json$$$https://tv.yydsys.top/$$$proxy$$$1$$$./lib/wogg.json$$$WNLG"},
@@ -689,14 +690,6 @@
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "肥羊TPTV",
"type": 0,
"url": "http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/tptv.m3u",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "肥羊B站直播",
"type": 0,
@@ -748,7 +741,7 @@
{
"name": "Gather.MyTV",
"type": 0,
"url": "https://tv.iill.top/m3u/MyTV",
"url": "http://127.0.0.1:10079/c/60/proxy/https://tv.iill.top/m3u/MyTV",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
@@ -826,17 +819,17 @@
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "fmm.live.ipv6",
"name": "fmm.live.ipv6.m3u",
"type": 0,
"url": "http://127.0.0.1:10079/c/3600/proxy/https://fanmingming.com/txt?url=https://live.fanmingming.com/tv/m3u/ipv6.m3u",
"url": "http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/ipv6.m3u",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"
},
{
"name": "fmm.live.ipv6.m3u",
"name": "fmm.live.ipv6",
"type": 0,
"url": "http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.com/tv/m3u/ipv6.m3u",
"url": "http://127.0.0.1:10079/c/3600/proxy/https://fanmingming.cn/txt?url=https://live.fanmingming.cn/tv/m3u/ipv6.m3u",
"ua": "okhttp/3.15",
"epg": "http://127.0.0.1:10079/p/0/proxy/http://epg.112114.xyz/?ch={name}&date={date}",
"logo": "http://127.0.0.1:10079/p/0/proxy/https://epg.112114.xyz/logo/{name}.png"

Binary file not shown.

View File

@@ -1 +1 @@
b145ffb9e568db822a91a45bd3554ef2
8f5b5f885047f152c31a4647112411ce

View File

@@ -1,18 +1,16 @@
[
{"name":"范明明IPV6","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.com/tv/m3u/ipv6.m3u"},
{"name":"范明明IPV6","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/ipv6.m3u"},
{"name":"肥羊国内直播","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/tv.m3u"},
{"name":"肥羊咪咕电视直播","url":"http://127.0.0.1:10079/c/1800/null/http://127.0.0.1:35456/migu.m3u"},
{"name":"肥羊TPTV","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/tptv.m3u"},
{"name":"肥羊B站直播","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/bililive.m3u"},
{"name":"肥羊虎牙一起看","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/huyayqk.m3u"},
{"name":"肥羊斗鱼一起看","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/douyuyqk.m3u"},
{"name":"肥羊YY轮播","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/yylunbo.m3u"},
{"name":"Gather.电视直播","url":"https://tv.iill.top/m3u/Gather"},
{"name":"Gather.网络直播","url":"https://tv.iill.top/m3u/Live"},
{"name":"Gather.MyTV","url":"https://tv.iill.top/m3u/MyTV"},
{"name":"范明明OfficalSite","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.com/tv/m3u/global.m3u"},
{"name":"Gather.MyTV","url":"http://127.0.0.1:10079/c/60/proxy/https://tv.iill.top/m3u/MyTV"},
{"name":"范明明OfficalSite","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/global.m3u"},
{"name":"范明明GitHub","url":"http://127.0.0.1:10079/c/3600/proxy/https://mirror.ghproxy.com/raw.githubusercontent.com/fanmingming/live/main/tv/m3u/global.m3u"},
{"name":"范明明IPV6","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.com/tv/m3u/ipv6.m3u"},
{"name":"范明明IPV6","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/ipv6.m3u"},
{"name":"PixMan.4GTV","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/4gtv.m3u"},
{"name":"PixMan.YSP","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/ysp.m3u"},
{"name":"PixMan.MyTVSuper","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/mytvsuper.m3u"},

BIN
PG/pg.jar

Binary file not shown.

View File

@@ -1 +1 @@
9acdd333af6564c708b4f5b26c24396c
cb893a87e880febf6e7ea0b11c2af2b6

View File

@@ -25,8 +25,16 @@ cheerio.jinja2 = function (template, obj) {
// 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';
const VERSION = vercode + ' 3.9.51beta5 20241104';
const VERSION = vercode + ' 3.9.51beta6 20241126';
const UpdateInfo = [
{
date: '20241126',
title: 'drpy更新优化去广告算法',
version: '3.9.51beta6 20241126',
msg: `
1. 更新龙头大佬提供的去广告算法
`
},
{
date: '20241104',
title: 'drpy更新增加新特性',
@@ -1036,9 +1044,10 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
* @returns {string}
*/
function fixAdM3u8Ai(m3u8_url, headers) {
let ts = new Date().getTime();
let option = headers ? {headers: headers} : {};
let ts = (new Date).getTime();
let option = headers ? {
headers: headers
} : {};
function b(s1, s2) {
let i = 0;
while (i < s1.length) {
@@ -1047,67 +1056,102 @@ function fixAdM3u8Ai(m3u8_url, headers) {
}
i++
}
return i;
return i
}
function reverseString(str) {
return str.split('').reverse().join('');
return str.split("").reverse().join("")
}
//log('播放的地址:' + m3u8_url);
let m3u8 = request(m3u8_url, option);
//log('m3u8处理前:' + m3u8);
m3u8 = m3u8.trim().split('\n').map(it => it.startsWith('#') ? it : urljoin(m3u8_url, it)).join('\n');
//log('m3u8处理后:============:' + m3u8);
// 获取嵌套m3u8地址
m3u8 = m3u8.replace(/\n\n/ig, '\n');//删除多余的换行符
let last_url = m3u8.split('\n').slice(-1)[0];
m3u8 = m3u8.trim().split("\n").map(it => it.startsWith("#") ? it : urljoin(m3u8_url, it)).join("\n");
m3u8 = m3u8.replace(/\n\n/gi, "\n");
let last_url = m3u8.split("\n").slice(-1)[0];
if (last_url.length < 5) {
last_url = m3u8.split('\n').slice(-2)[0];
last_url = m3u8.split("\n").slice(-2)[0]
}
if (last_url.includes('.m3u8') && last_url !== m3u8_url) {
if (last_url.includes(".m3u8") && last_url !== m3u8_url) {
m3u8_url = urljoin2(m3u8_url, last_url);
log('嵌套的m3u8_url:' + m3u8_url);
m3u8 = request(m3u8_url, option);
log("嵌套的m3u8_url:" + m3u8_url);
m3u8 = request(m3u8_url, option)
}
//log('----处理有广告的地址----');
let s = m3u8.trim().split('\n').filter(it => it.trim()).join('\n');
let ss = s.split('\n')
//找出第一条播放地址
//let firststr = ss.find(x => !x.startsWith('#'));
let firststr = '';
let maxl = 0;//最大相同字符
let s = m3u8.trim().split("\n").filter(it => it.trim()).join("\n");
let ss = s.split("\n");
if (m3u8_url.indexOf("ffzy") > 0) {
let j = 0
, k1 = 0
, m = 0
, n = 0
, t = 0;
let s2 = "";
for (let i = 0; i < ss.length; i++) {
let s = ss[i];
let s1 = "";
if (s.startsWith("#EXTINF")) {
s1 = s.slice(8);
n++;
if (n == 1)
k1 = i;
if (s2.indexOf(s1) == -1) {
s2 = s2 + s1;
m++;
}
t = t + parseFloat(s1);
i++;
s = ss[i];
}
if (s.startsWith("#EXT-X-DISCONTINUITY")) {
if (n == 5) {
log("n:" + n);
log("m:" + m);
for (let j = k1; j < k1 + n * 2; j++) {
log(ss[j]);
}
log("广告位置:" + k1);
log("数据条数:" + n);
log("数据种类:" + m);
log("广告时间:" + t.toFixed(5));
ss.splice(k1, 2 * n + 1);
i = i - 2 * n + 1;
}
t = 0;
m = 0;
n = 0;
s2 = "";
}
}
}
let firststr = "";
let maxl = 0;
let kk = 0;
let kkk = 2;
let secondstr = '';
let kkk1 = 1;
let kkk2 = 0;
let secondstr = "";
for (let i = 0; i < ss.length; i++) {
let s = ss[i];
if (!s.startsWith("#")) {
if (kk == 0) firststr = s;
if (kk == 1) maxl = b(firststr, s);
if (kk > 1) {
if (maxl > b(firststr, s)) {
if (secondstr.length < 5) secondstr = s;
kkk = kkk + 2;
if (kk == 0)
firststr = s;
if (kk > 0) {
if (maxl > b(firststr, s) + 1) {
if (secondstr.length < 5)
secondstr = s;
kkk2++
} else {
maxl = b(firststr, s);
kkk++;
kkk1++
}
}
kk++;
if (kk >= 20) break;
if (kk >= 30)
break
}
}
if (kkk > 30) firststr = secondstr;
if (kkk2 > kkk1)
firststr = secondstr;
let firststrlen = firststr.length;
//log('字符串长度:' + firststrlen);
let ml = Math.round(ss.length / 2).toString().length;//取数据的长度的位数
//log('数据条数的长度:' + ml);
//找出最后一条播放地址
let ml = Math.round(ss.length / 2).toString().length;
let maxc = 0;
let laststr = ss.toReversed().find((x) => {
if (!x.startsWith('#')) {
let laststr = ss.toReversed().find(x => {
if (!x.startsWith("#")) {
let k = b(reverseString(firststr), reverseString(x));
maxl = b(firststr, x);
maxc++;
@@ -1116,30 +1160,30 @@ function fixAdM3u8Ai(m3u8_url, headers) {
}
}
return false
});
log('最后一条切片:' + laststr);
//log('最小相同字符长度:' + maxl);
}
);
log("最后一条切片:" + laststr);
let ad_urls = [];
for (let i = 0; i < ss.length; i++) {
let s = ss[i];
if (!s.startsWith('#')) {
if (!s.startsWith("#")) {
if (b(firststr, s) < maxl) {
ad_urls.push(s); // 广告地址加入列表
ad_urls.push(s);
ss.splice(i - 1, 2);
i = i - 2;
i = i - 2
} else {
ss[i] = urljoin(m3u8_url, s);
ss[i] = urljoin(m3u8_url, s)
}
} else {
ss[i] = s.replace(/URI=\"(.*)\"/, 'URI=\"' + urljoin(m3u8_url, '$1') + '\"');
ss[i] = s.replace(/URI=\"(.*)\"/, 'URI="' + urljoin(m3u8_url, "$1") + '"')
}
}
log('处理的m3u8地址:' + m3u8_url);
log('----广告地址----');
log("处理的m3u8地址:" + m3u8_url);
log("----广告地址----");
log(ad_urls);
m3u8 = ss.join('\n');
//log('处理完成');
log('处理耗时:' + (new Date().getTime() - ts).toString());
m3u8 = ss.join("\n");
log("处理耗时:" + ((new Date).getTime() - ts).toString());
log(m3u8);
return m3u8
}

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -1 +1 @@
9acdd333af6564c708b4f5b26c24396c
cb893a87e880febf6e7ea0b11c2af2b6

Binary file not shown.

View File

@@ -1 +1 @@
b145ffb9e568db822a91a45bd3554ef2
8f5b5f885047f152c31a4647112411ce

View File

@@ -1,5 +1,23 @@
[
{"name":"范明明OfficalSite","url":"https://live.fanmingming.com/tv/m3u/global.m3u"},
{"name":"范明明GitHub","url":"https://mirror.ghproxy.com/raw.githubusercontent.com/fanmingming/live/main/tv/m3u/global.m3u"},
{"name":"范明明IPV6","url":"https://live.fanmingming.com/tv/m3u/ipv6.m3u"}
{"name":"范明明IPV6","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/ipv6.m3u"},
{"name":"肥羊国内直播","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/tv.m3u"},
{"name":"肥羊B站直播","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/bililive.m3u"},
{"name":"肥羊虎牙一起看","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/huyayqk.m3u"},
{"name":"肥羊斗鱼一起看","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/douyuyqk.m3u"},
{"name":"肥羊YY轮播","url":"http://127.0.0.1:10079/c/3600/null/http://127.0.0.1:35456/yylunbo.m3u"},
{"name":"Gather.电视直播","url":"https://tv.iill.top/m3u/Gather"},
{"name":"Gather.网络直播","url":"https://tv.iill.top/m3u/Live"},
{"name":"Gather.MyTV","url":"http://127.0.0.1:10079/c/60/proxy/https://tv.iill.top/m3u/MyTV"},
{"name":"范明明OfficalSite","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/global.m3u"},
{"name":"范明明GitHub","url":"http://127.0.0.1:10079/c/3600/proxy/https://mirror.ghproxy.com/raw.githubusercontent.com/fanmingming/live/main/tv/m3u/global.m3u"},
{"name":"范明明IPV6","url":"http://127.0.0.1:10079/c/3600/proxy/https://live.fanmingming.cn/tv/m3u/ipv6.m3u"},
{"name":"PixMan.4GTV","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/4gtv.m3u"},
{"name":"PixMan.YSP","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/ysp.m3u"},
{"name":"PixMan.MyTVSuper","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/mytvsuper.m3u"},
{"name":"PixMan.BeeSport","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/beesport.m3u"},
{"name":"PixMan.TheTV","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/thetv.m3u"},
{"name":"PixMan.ITV","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/itv_proxy.m3u"},
{"name":"PixMan.TPTV","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/tptv.m3u"},
{"name":"PixMan.Hami","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/hami.m3u"},
{"name":"PixMan.DLHD","url":"http://127.0.0.1:10079/c/3600/null/http://192.168.101.2:5050/dlhd.m3u"}
]