mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-05-28 10:11:25 +00:00
Compare commits
3 Commits
da70072263
...
96e2c3905e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96e2c3905e | ||
|
|
504d764cc4 | ||
|
|
db7d841f8a |
@ -1673,7 +1673,7 @@ class TwitterBroadcastIE(TwitterBaseIE, PeriscopeBaseIE):
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
broadcast_type, display_id = self._match_valid_url(url).groups()
|
broadcast_type, display_id = self._match_valid_url(url).group('type', 'id')
|
||||||
|
|
||||||
if broadcast_type == 'events':
|
if broadcast_type == 'events':
|
||||||
timeline = self._call_api(
|
timeline = self._call_api(
|
||||||
@ -1690,11 +1690,15 @@ class TwitterBroadcastIE(TwitterBaseIE, PeriscopeBaseIE):
|
|||||||
if not broadcast:
|
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