]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/bitwave.py
1 from .common
import InfoExtractor
4 class BitwaveReplayIE(InfoExtractor
):
5 IE_NAME
= 'bitwave:replay'
6 _VALID_URL
= r
'https?://(?:www\.)?bitwave\.tv/(?P<user>\w+)/replay/(?P<id>\w+)/?$'
8 'url': 'https://bitwave.tv/RhythmicCarnage/replay/z4P6eq5L7WDrM85UCrVr',
12 def _real_extract(self
, url
):
13 replay_id
= self
._match
_id
(url
)
14 replay
= self
._download
_json
(
15 'https://api.bitwave.tv/v1/replays/' + replay_id
,
21 'title': replay
['data']['title'],
22 'uploader': replay
['data']['name'],
23 'uploader_id': replay
['data']['name'],
24 'url': replay
['data']['url'],
26 {'url': x}
for x
in replay
['data']['thumbnails']
31 class BitwaveStreamIE(InfoExtractor
):
32 IE_NAME
= 'bitwave:stream'
33 _VALID_URL
= r
'https?://(?:www\.)?bitwave\.tv/(?P<id>\w+)/?$'
35 'url': 'https://bitwave.tv/doomtube',
39 def _real_extract(self
, url
):
40 username
= self
._match
_id
(url
)
41 channel
= self
._download
_json
(
42 'https://api.bitwave.tv/v1/channels/' + username
,
45 formats
= self
._extract
_m
3u8_formats
(
46 channel
['data']['url'], username
,
51 'title': channel
['data']['title'],
53 'uploader_id': username
,
55 'thumbnail': channel
['data']['thumbnail'],
57 'view_count': channel
['data']['viewCount']