-# coding: utf-8
-from __future__ import unicode_literals
-
from .common import InfoExtractor
from ..utils import ExtractorError, urlencode_postdata
user_id = self._match_id(url)
info_raw = self._download_json(
- 'https://bigo.tv/studio/getInternalStudioInfo',
- user_id, data=urlencode_postdata({'siteId': user_id}))
+ 'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo',
+ user_id, data=urlencode_postdata({'siteId': user_id}),
+ headers={'Accept': 'application/json'})
if not isinstance(info_raw, dict):
raise ExtractorError('Received invalid JSON data')
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,