From 0d692cd089c3278abde3f5b5b2adfa48bbac53c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=9A=E9=A3=8E=E6=8B=82=E6=9F=B3=E9=A2=9C?= <434857005@qq.com> Date: Sat, 13 Jan 2024 12:04:08 +0800 Subject: [PATCH] =?UTF-8?q?t4=E5=A2=9E=E5=8A=A0=E8=BE=85=E5=8A=A9=E5=97=85?= =?UTF-8?q?=E6=8E=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- txt/hipy/哔滴影视.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/txt/hipy/哔滴影视.py b/txt/hipy/哔滴影视.py index cfa073c..2c1a18e 100644 --- a/txt/hipy/哔滴影视.py +++ b/txt/hipy/哔滴影视.py @@ -151,6 +151,13 @@ class Spider(BaseSpider): # 元类 默认的元类 type gParam['inited'] = True + def isVideo(self): + """ + 返回是否为视频的匹配字符串 + @return: None空 reg:正则表达式 js:input js代码 + """ + return 'js:input.includes(".m3u8)?true:false' + def isVideoFormat(self, url): pass @@ -386,6 +393,11 @@ class Spider(BaseSpider): # 元类 默认的元类 type def localProxy(self, params): # print(params) url = params.get('url') + if not url: + # return [302, 'text/html', None, {'location': 'https://www.baidu.com'}] + # return [404, 'text/plain', 'Not Found'] + return [403, 'text/plain', '403 forbidden. url is required'] + name = params.get('name') or 'm3u8' burl = 'https://www.bdys03.com' new_url = url.replace("www.bde4.cc", "www.bdys03.com") @@ -407,7 +419,6 @@ class Spider(BaseSpider): # 元类 默认的元类 type 'header': headers, 'param': '', 'type': media_type, - 'after': '' } if '3' in self.ENV: return [200, media_type, action, content]