summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/showroomlive.py
diff options
context:
space:
mode:
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')),