Skip to content

Commit

Permalink
[bigo] inline formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Lesmiscore committed Jan 30, 2022
1 parent 211fb53 commit a7100a9
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions yt_dlp/extractor/bigo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

class BigoIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?bigo\.tv/(?:[a-z]{2,}/)?(?P<id>[^/]+)'
# Note: I would like to provide some real test, but Bigo is a live streaming
# site, and a test would require that the broadcaster is live at the moment.
# So, I don't have a good way to provide a real test here.

_TESTS = [{
'url': 'https://www.bigo.tv/ja/221338632',
'info_dict': {
Expand Down Expand Up @@ -44,19 +42,14 @@ def _real_extract(self, url):
if not info.get('alive'):
raise ExtractorError('This user is offline.', expected=True)

# formats = self._extract_m3u8_formats(
# info.get('hls_src'), user_id, ext='mp4')
formats = [{
'url': info.get('hls_src'),
'ext': 'mp4',
'protocol': 'm3u8',
'is_live': True,
}]

return {
'id': info.get('roomId') or user_id,
'title': info.get('roomTopic'),
'formats': formats,
'formats': [{
'url': info.get('hls_src'),
'ext': 'mp4',
'protocol': 'm3u8',
}],
'thumbnail': info.get('snapshot'),
'uploader': info.get('nick_name'),
'uploader_id': user_id,
Expand Down

0 comments on commit a7100a9

Please sign in to comment.