mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-05-01 13:06:10 +00:00
fix
This commit is contained in:
parent
da70072263
commit
db7d841f8a
@ -1684,17 +1684,21 @@ class TwitterBroadcastIE(TwitterBaseIE, PeriscopeBaseIE):
|
|||||||
else:
|
else:
|
||||||
broadcast_id = display_id
|
broadcast_id = display_id
|
||||||
|
|
||||||
broadcast = self._call_api(
|
if not (broadcast := self._call_api(
|
||||||
'broadcasts/show.json', broadcast_id,
|
'broadcasts/show.json', broadcast_id, {'ids': broadcast_id},
|
||||||
{'ids': broadcast_id})['broadcasts'][broadcast_id]
|
)['broadcasts'][broadcast_id]):
|
||||||
if not broadcast:
|
|
||||||
raise ExtractorError('Broadcast no longer exists', expected=True)
|
raise ExtractorError('Broadcast no longer exists', expected=True)
|
||||||
|
|
||||||
info = self._parse_broadcast_data(broadcast, broadcast_id)
|
info = self._parse_broadcast_data(broadcast, broadcast_id)
|
||||||
info['title'] = broadcast.get('status') or info.get('title')
|
info.update({
|
||||||
info['uploader_id'] = broadcast.get('twitter_username') or info.get('uploader_id')
|
'display_id': display_id,
|
||||||
info['uploader_url'] = format_field(broadcast, 'twitter_username', 'https://twitter.com/%s', default=None)
|
'title': broadcast.get('status') or info.get('title'),
|
||||||
info['display_id'] = display_id
|
'uploader_id': broadcast.get('twitter_username') or info.get('uploader_id'),
|
||||||
|
'uploader_url': format_field(
|
||||||
|
broadcast, 'twitter_username', 'https://twitter.com/%s', default=None),
|
||||||
|
})
|
||||||
if info['live_status'] == 'is_upcoming':
|
if info['live_status'] == 'is_upcoming':
|
||||||
|
self.raise_no_formats('This live broadcast has not yet started', expected=True)
|
||||||
return info
|
return info
|
||||||
|
|
||||||
media_key = broadcast['media_key']
|
media_key = broadcast['media_key']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user