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:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
commitfd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch)
treee1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/showroomlive.py
parentReleasing progress-linux version 2024.05.27-1~progress7.99u1. (diff)
downloadyt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz
yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip
Merging upstream version 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')),