summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/saitosan.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--yt_dlp/extractor/saitosan.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/saitosan.py b/yt_dlp/extractor/saitosan.py
index a5f05e1..4ed9195 100644
--- a/yt_dlp/extractor/saitosan.py
+++ b/yt_dlp/extractor/saitosan.py
@@ -47,15 +47,15 @@ class SaitosanIE(InfoExtractor):
base += '&sid=' + sid
self._download_webpage(base, b_id, note='Polling socket')
- payload = '420["room_start_join",{"room_id":"%s"}]' % b_id
- payload = '%s:%s' % (len(payload), payload)
+ payload = f'420["room_start_join",{{"room_id":"{b_id}"}}]'
+ payload = f'{len(payload)}:{payload}'
self._download_webpage(base, b_id, data=payload, note='Polling socket with payload')
response = self._download_socket_json(base, b_id, note='Polling socket')
if not response.get('ok'):
err = response.get('error') or {}
raise ExtractorError(
- '%s said: %s - %s' % (self.IE_NAME, err.get('code', '?'), err.get('msg', 'Unknown')) if err
+ '{} said: {} - {}'.format(self.IE_NAME, err.get('code', '?'), err.get('msg', 'Unknown')) if err
else 'The socket reported that the broadcast could not be joined. Maybe it\'s offline or the URL is incorrect',
expected=True, video_id=b_id)
@@ -71,5 +71,5 @@ class SaitosanIE(InfoExtractor):
'formats': self._extract_m3u8_formats(m3u8_url, b_id, 'mp4', live=True),
'thumbnail': m3u8_url.replace('av.m3u8', 'thumb'),
'uploader': try_get(b_data, lambda x: x['broadcast_user']['name']), # same as title
- 'is_live': True
+ 'is_live': True,
}