mirror of
https://github.com/qist/tvbox.git
synced 2026-11-04 18:53:24 +00:00
直播添加ua
This commit is contained in:
1 parent
b2807dd4f4
commit
ba32661f7e
3 files changed
+7
-6
No files matched your search
+5
-4
@@ -219,16 +219,17 @@ class Spider(Spider):
|
||||
return result
|
||||
|
||||
def playerContent(self, flag, id, vipFlags):
|
||||
h = {'User-Agent': self.header['User-Agent']}
|
||||
# 直播: 直接用m3u8地址
|
||||
if id.startswith('live@'):
|
||||
m3u8 = id.replace('live@', '')
|
||||
if m3u8.startswith('http'):
|
||||
return {'parse': 0, 'url': m3u8, 'header': {}, 'playUrl': ''}
|
||||
return {'parse': 0, 'url': m3u8, 'header': h, 'playUrl': ''}
|
||||
stream = self._get_live_stream(m3u8)
|
||||
return {'parse': 0, 'url': stream, 'header': {}, 'playUrl': ''}
|
||||
# m3u8直链(从detailContent传过来的)
|
||||
return {'parse': 0, 'url': stream, 'header': h, 'playUrl': ''}
|
||||
# m3u8直链
|
||||
if id.startswith('http'):
|
||||
return {'parse': 0, 'url': id, 'header': {}, 'playUrl': ''}
|
||||
return {'parse': 0, 'url': id, 'header': h, 'playUrl': ''}
|
||||
# 点播
|
||||
parts = id.split('@')
|
||||
route = parts[0] if len(parts) > 1 else 'play'
|
||||
|
||||
Reference in new issue
Block a user