'timestamp': 1632782451.058,
'duration': 58.5585,
'tags': ['hornofafrica', 'explorations'],
- }
+ },
}, {
'url': 'https://gettr.com/post/p4iahp',
'info_dict': {
'timestamp': 1626594455.017,
'duration': 23,
'tags': 'count:12',
- }
+ },
}, {
# quote post
'url': 'https://gettr.com/post/pxn5b743a9',
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 {}
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',
'title': 'Day 1: Opening Session of the Grand Jury Proceeding',
'timestamp': 1644080997.164,
'upload_date': '20220205',
- }
+ },
}, {
'url': 'https://gettr.com/streaming/psfmeefcc1',
'info_dict': {
'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'))