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]