From bb002349cd8e625f358750f0a1fac9cf1ca59b45 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Sat, 3 Sep 2022 13:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E4=B8=80=E5=A0=86?= =?UTF-8?q?=E4=B8=9C=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 18 ++++++++++++++++-- classes/cms.py | 4 ++-- "js/\350\247\243\346\236\220.conf" | 2 +- txt/issue.txt | 7 ++++++- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index d6730f4..905acea 100644 --- a/app.py +++ b/app.py @@ -234,8 +234,8 @@ def vod(): wd = getParmas('wd') ac = getParmas('ac') quick = getParmas('quick') - play = getParmas('play') - flag = getParmas('flag') + play = getParmas('play') # 类型为4的时候点击播放会带上来 + flag = getParmas('flag') # 类型为4的时候点击播放会带上来 filter = getParmas('filter') t = getParmas('t') pg = getParmas('pg','1') @@ -244,6 +244,20 @@ def vod(): q = getParmas('q') play_url = getParmas('play_url') + if play: + jxs = getJxs() + play_url = play.split('play_url=')[1] + play_url = cms.playContent(play_url, jxs,flag) + if isinstance(play_url, str): + # return redirect(play_url) + # return jsonify({'parse': 0, 'playUrl': play_url, 'jx': 0, 'url': play_url}) + # return jsonify({'parse': 0, 'playUrl': play_url, 'jx': 0, 'url': ''}) + return jsonify({'parse': 0, 'playUrl': '', 'jx': 0, 'url': play_url}) + elif isinstance(play_url, dict): + return jsonify(play_url) + else: + return play_url + if play_url: # 播放 jxs = getJxs() play_url = cms.playContent(play_url,jxs) diff --git a/classes/cms.py b/classes/cms.py index 258dd34..ab6eef5 100644 --- a/classes/cms.py +++ b/classes/cms.py @@ -417,7 +417,7 @@ class CMS: pdfh = jsp.pjfh if is_json else jsp.pdfh pdfa = jsp.pjfa if is_json else jsp.pdfa pd = jsp.pj if is_json else jsp.pd - print(html) + # print(html) try: if self.double: items = pdfa(html, p[0]) @@ -771,7 +771,7 @@ class CMS: } return result - def playContent(self, play_url,jxs=None): + def playContent(self, play_url,jxs=None,flag=None): # logger.info('播放免嗅地址: ' + self.play_url) if not jxs: jxs = [] diff --git "a/js/\350\247\243\346\236\220.conf" "b/js/\350\247\243\346\236\220.conf" index 539b79b..65fe906 100644 --- "a/js/\350\247\243\346\236\220.conf" +++ "b/js/\350\247\243\346\236\220.conf" @@ -1,4 +1,4 @@ -# 0123,对应,普通解析,json解析,并发解析,聚合解析,参数3不填默认0 +# 0123,对应,普通解析,json解析,并发多json解析,聚合解析,参数3不填默认0 BT5V,https://rx.bt5v.com/json/jsonindex.php/?url=,1 爱酷,https://cache.json.icu/home/api?type=ys&uid=292796&key=fnoryABDEFJNPQV269&url=,1 # m3u8tv,https://jx.m3u8.tv/jiexi/?url= diff --git a/txt/issue.txt b/txt/issue.txt index d50d8c9..f833140 100644 --- a/txt/issue.txt +++ b/txt/issue.txt @@ -31,4 +31,9 @@ https://cuiqingcai.com/202232.html "homepage":"https://gitcode.net/qq_32394351/dr_py", -"imgo", \ No newline at end of file +"imgo", + +config文件 type类型 +0 资源网 +1 app(xiaogui) +4 app(xiaogui) 播放的时候自动带上play 和 flag(线路名) \ No newline at end of file -- GitLab