From be9ef37c536392e1e022a4c36422e92332e8747d Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Thu, 17 Nov 2022 21:37:21 +0800 Subject: [PATCH] =?UTF-8?q?js0=E6=92=AD=E6=94=BE=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/rules.db | Bin 155648 -> 155648 bytes controllers/cms.py | 4 ++-- js/version.txt | 2 +- ...67\347\233\227\345\220\254\344\271\246.js" | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/rules.db b/base/rules.db index 417e33edd06baa13c41b70963cc089ebab358c3e..726ea491e66a8d8ef0f5299f916429bfab3efc15 100644 GIT binary patch delta 30 mcmZoTz}awsbAmME!ih4@j0-m=Ea+x5XlCr$&e+5F|1toxDhvhy delta 30 mcmZoTz}awsbAmMEyooZ-jPo`oEa+x5Y-a4)&e+5F|1tow#S8%e diff --git a/controllers/cms.py b/controllers/cms.py index 94f3b6b..e847f6a 100644 --- a/controllers/cms.py +++ b/controllers/cms.py @@ -1365,7 +1365,7 @@ class CMS: if type(self.lazy) == JsObjectWrapper: logger.info(f'lazy非纯文本免嗅失败耗时:{get_interval(t1)}毫秒,播放地址:{play_url}') - elif not str(self.lazy).startswith('js:'): + elif str(self.lazy).startswith('py:'): pycode = runPy(self.lazy) if pycode: # print(pycode) @@ -1378,7 +1378,7 @@ class CMS: if isinstance(lazy_url,str) and lazy_url.startswith('http'): play_url = lazy_url else: - jscode = str(self.lazy).split('js:')[1] + jscode = str(self.lazy).strip().replace('js:', '', 1) if str(self.lazy).startswith('js:') else js_code jsp = jsoup(self.url) # jscode = f'var input={play_url};{jscode}' # print(jscode) diff --git a/js/version.txt b/js/version.txt index a411a37..bd41b0f 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.7.5beta9 \ No newline at end of file +3.7.4 \ No newline at end of file diff --git "a/js/\346\265\267\347\233\227\345\220\254\344\271\246.js" "b/js/\346\265\267\347\233\227\345\220\254\344\271\246.js" index 199b2b2..9d53563 100644 --- "a/js/\346\265\267\347\233\227\345\220\254\344\271\246.js" +++ "b/js/\346\265\267\347\233\227\345\220\254\344\271\246.js" @@ -35,7 +35,7 @@ var rule = { class_url:'1&2&3', play_parse:true, play_json:0, - lazy:"let bookId=input.match(/play\\/(.*?)\\//)[1];let chapterId=input.match(/.*\\/(.*?)\\.html/)[1];let url='https://app.tingxiaoshuo.cc/listen/apptingchina/AppGetChapterUrl2022?uid=09e0bbefd378830f9615a98f239aceab&chapterId='+chapterId+'&bookId='+bookId;let res=request(url,{headers:{'User-Agent':PC_UA}});res=JSON.parse(res);input=res.src;log(input);", + lazy:"js:let bookId=input.match(/play\\/(.*?)\\//)[1];let chapterId=input.match(/.*\\/(.*?)\\.html/)[1];let url='https://app.tingxiaoshuo.cc/listen/apptingchina/AppGetChapterUrl2022?uid=09e0bbefd378830f9615a98f239aceab&chapterId='+chapterId+'&bookId='+bookId;log(url);let res=request(url,{headers:{'User-Agent':PC_UA}});res=JSON.parse(res);input=res.src;log(input);", limit:6, double:true, 推荐:'*', -- GitLab