From 095e0b19cda74c150a62d20361b8f75253b2f1ed Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Fri, 16 Sep 2022 09:14:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=B1=86=E7=93=A3=E6=8E=A8?= =?UTF-8?q?=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/config.txt | 9 +++++++++ utils/files.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/config.txt b/templates/config.txt index 5730c71..91b5c22 100644 --- a/templates/config.txt +++ b/templates/config.txt @@ -91,6 +91,15 @@ } }], "lives":[{"group":"redirect","channels":[{"name":"直播","urls":["proxy://do=live&type=txt&ext={{live_url}}"]}]}], +"sniffer": { + "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27", + "isVideoFormat": "http((?!http).){26,}\\.(m3u8|mp4|flv|avi|mkv|wmv|mpg|mpeg|mov|ts|3gp|rm|rmvb|asf|m4a|mp3|wma)", + "custom": [ + {"url":"/Cloud/Down/AliCloud/", "mimeType":"text/html", "encoding":"utf-8", "header":{"Referer": "https://zxzj.vip/"}} + ] +}, +"recommend": [{"name": "豆瓣推荐","request": {"method": "GET","header": [{"key": "Referer","value": "https://movie.douban.com/"}],"url": {"raw": "https://movie.douban.com/j/new_search_subjects?sort=U&range=0,10&tags=&playable=1&start=0&year_range=2022,2022"}},"response": {"result": "$.data","data": [{"key": "name","value": "title"},{"key": "note","value": "rate"},{"key": "pic","value": "cover"}]},"expires" : "86400"}], +"rating": [{"name": "rating","request": {"method": "GET","url": {"raw": "https://api.wmdb.tv/api/v1/movie/search?q={name}&limit=1"}},"response": {"result": "this","data": [{"key": "rating","value": "doubanRating"}]}}], "ijk": [{ "group": "软解码", "options": [{ diff --git a/utils/files.py b/utils/files.py index a58bc31..8c5fc08 100644 --- a/utils/files.py +++ b/utils/files.py @@ -78,7 +78,7 @@ def custom_merge(original:dict,custom:dict): new_keys = custom.keys() updateObj = {} extend_obj = {} - for key in ['wallpaper','spider','homepage','lives','hotSearch']: + for key in ['wallpaper','spider','homepage','lives','hotSearch','sniffer','recommend','rating']: if key in new_keys: updateObj[key] = custom[key] -- GitLab