summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/gettr.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/gettr.py')
-rw-r--r--yt_dlp/extractor/gettr.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/yt_dlp/extractor/gettr.py b/yt_dlp/extractor/gettr.py
index b9dc7c6..2a9d5e7 100644
--- a/yt_dlp/extractor/gettr.py
+++ b/yt_dlp/extractor/gettr.py
@@ -38,7 +38,7 @@ class GettrIE(GettrBaseIE):
'timestamp': 1632782451.058,
'duration': 58.5585,
'tags': ['hornofafrica', 'explorations'],
- }
+ },
}, {
'url': 'https://gettr.com/post/p4iahp',
'info_dict': {
@@ -53,7 +53,7 @@ class GettrIE(GettrBaseIE):
'timestamp': 1626594455.017,
'duration': 23,
'tags': 'count:12',
- }
+ },
}, {
# quote post
'url': 'https://gettr.com/post/pxn5b743a9',
@@ -76,7 +76,7 @@ class GettrIE(GettrBaseIE):
def _real_extract(self, url):
post_id = self._match_id(url)
webpage = self._download_webpage(url, post_id)
- api_data = self._call_api('post/%s?incl="poststats|userinfo"' % post_id, post_id)
+ api_data = self._call_api(f'post/{post_id}?incl="poststats|userinfo"', post_id)
post_data = api_data.get('data')
user_data = try_get(api_data, lambda x: x['aux']['uinf'][post_data['uid']], dict) or {}
@@ -106,7 +106,7 @@ class GettrIE(GettrBaseIE):
or self._search_regex(r'^(.+?) on GETTR', self._og_search_title(webpage, default=''), 'uploader', fatal=False))
if uploader:
- title = '%s - %s' % (uploader, title)
+ title = f'{uploader} - {title}'
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
urljoin(self._MEDIA_BASE_URL, vid), post_id, 'mp4',
@@ -157,7 +157,7 @@ class GettrStreamingIE(GettrBaseIE):
'title': 'Day 1: Opening Session of the Grand Jury Proceeding',
'timestamp': 1644080997.164,
'upload_date': '20220205',
- }
+ },
}, {
'url': 'https://gettr.com/streaming/psfmeefcc1',
'info_dict': {
@@ -172,12 +172,12 @@ class GettrStreamingIE(GettrBaseIE):
'duration': 21872.507,
'timestamp': 1643976662.858,
'upload_date': '20220204',
- }
+ },
}]
def _real_extract(self, url):
video_id = self._match_id(url)
- video_info = self._call_api('live/join/%s' % video_id, video_id, data={})
+ video_info = self._call_api(f'live/join/{video_id}', video_id, data={})
live_info = video_info['broadcast']
live_url = url_or_none(live_info.get('url'))