aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/bigo.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-12-02 05:21:10 +0800
committerJesús <heckyel@hyperbola.info>2022-12-02 05:21:10 +0800
commiteaeeef9c1d1bedb76fea953c332ef84d53bffe2c (patch)
treec3cb5582247e47fc67c24cd7ff8ea857fb76821e /hypervideo_dl/extractor/bigo.py
parent1e5a50b71d8f0eae6007bedc329eecb24bb5aba3 (diff)
downloadhypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.lz
hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.tar.xz
hypervideo-eaeeef9c1d1bedb76fea953c332ef84d53bffe2c.zip
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/bigo.py')
-rw-r--r--hypervideo_dl/extractor/bigo.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/hypervideo_dl/extractor/bigo.py b/hypervideo_dl/extractor/bigo.py
index ddf76ac..1cb6e58 100644
--- a/hypervideo_dl/extractor/bigo.py
+++ b/hypervideo_dl/extractor/bigo.py
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
from .common import InfoExtractor
from ..utils import ExtractorError, urlencode_postdata
@@ -31,7 +28,7 @@ class BigoIE(InfoExtractor):
user_id = self._match_id(url)
info_raw = self._download_json(
- 'https://bigo.tv/studio/getInternalStudioInfo',
+ 'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo',
user_id, data=urlencode_postdata({'siteId': user_id}))
if not isinstance(info_raw, dict):
@@ -44,14 +41,14 @@ class BigoIE(InfoExtractor):
if not info.get('alive'):
raise ExtractorError('This user is offline.', expected=True)
+ formats, subs = self._extract_m3u8_formats_and_subtitles(
+ info.get('hls_src'), user_id, 'mp4', 'm3u8')
+
return {
'id': info.get('roomId') or user_id,
'title': info.get('roomTopic') or info.get('nick_name') or user_id,
- 'formats': [{
- 'url': info.get('hls_src'),
- 'ext': 'mp4',
- 'protocol': 'm3u8',
- }],
+ 'formats': formats,
+ 'subtitles': subs,
'thumbnail': info.get('snapshot'),
'uploader': info.get('nick_name'),
'uploader_id': user_id,