summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/showroomlive.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit7e21328585afda6d66f98ca476301680eeffac32 (patch)
tree266a4e7b20443f94572748781d71fc0375a15037 /yt_dlp/extractor/showroomlive.py
parentAdding upstream version 2024.05.27. (diff)
downloadyt-dlp-7e21328585afda6d66f98ca476301680eeffac32.tar.xz
yt-dlp-7e21328585afda6d66f98ca476301680eeffac32.zip
Adding upstream version 2024.07.01.upstream/2024.07.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/showroomlive.py')
-rw-r--r--yt_dlp/extractor/showroomlive.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/yt_dlp/extractor/showroomlive.py b/yt_dlp/extractor/showroomlive.py
index ab18953..303f0b3 100644
--- a/yt_dlp/extractor/showroomlive.py
+++ b/yt_dlp/extractor/showroomlive.py
@@ -1,5 +1,4 @@
from .common import InfoExtractor
-from ..compat import compat_str
from ..utils import (
ExtractorError,
int_or_none,
@@ -24,18 +23,18 @@ class ShowRoomLiveIE(InfoExtractor):
r'(?:profile|room)\?room_id\=(\d+)'), webpage, 'room_id')
room = self._download_json(
- urljoin(url, '/api/room/profile?room_id=%s' % room_id),
+ urljoin(url, f'/api/room/profile?room_id={room_id}'),
broadcaster_id)
is_live = room.get('is_onlive')
if is_live is not True:
- raise ExtractorError('%s is offline' % broadcaster_id, expected=True)
+ raise ExtractorError(f'{broadcaster_id} is offline', expected=True)
uploader = room.get('performer_name') or broadcaster_id
title = room.get('room_name') or room.get('main_name') or uploader
streaming_url_list = self._download_json(
- urljoin(url, '/api/live/streaming_url?room_id=%s' % room_id),
+ urljoin(url, f'/api/live/streaming_url?room_id={room_id}'),
broadcaster_id)['streaming_url_list']
formats = []
@@ -68,7 +67,7 @@ class ShowRoomLiveIE(InfoExtractor):
})
return {
- 'id': compat_str(room.get('live_id') or broadcaster_id),
+ 'id': str(room.get('live_id') or broadcaster_id),
'title': title,
'description': room.get('description'),
'timestamp': int_or_none(room.get('current_live_started_at')),