mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-08 01:13:15 +00:00
[ie/twitter:spaces] Fix format protocol (#7550)
Closes #7536 Authored by: bashonly
This commit is contained in:
parent
bb5d84c9d2
commit
613dbce177
|
@ -1499,6 +1499,38 @@ class TwitterSpacesIE(TwitterBaseIE):
|
||||||
'release_date': '20220807',
|
'release_date': '20220807',
|
||||||
},
|
},
|
||||||
'params': {'skip_download': 'm3u8'},
|
'params': {'skip_download': 'm3u8'},
|
||||||
|
}, {
|
||||||
|
# post_live/TimedOut but downloadable
|
||||||
|
'url': 'https://twitter.com/i/spaces/1vAxRAVQWONJl',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '1vAxRAVQWONJl',
|
||||||
|
'ext': 'm4a',
|
||||||
|
'title': 'Framing Up FinOps: Billing Tools',
|
||||||
|
'description': 'Twitter Space participated by rupa, Alfonso Hernandez',
|
||||||
|
'uploader': 'Google Cloud',
|
||||||
|
'uploader_id': 'googlecloud',
|
||||||
|
'live_status': 'post_live',
|
||||||
|
'timestamp': 1681409554,
|
||||||
|
'upload_date': '20230413',
|
||||||
|
'release_timestamp': 1681839000,
|
||||||
|
'release_date': '20230418',
|
||||||
|
},
|
||||||
|
'params': {'skip_download': 'm3u8'},
|
||||||
|
}, {
|
||||||
|
# Needs ffmpeg as downloader, see: https://github.com/yt-dlp/yt-dlp/issues/7536
|
||||||
|
'url': 'https://twitter.com/i/spaces/1eaKbrQbjoRKX',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '1eaKbrQbjoRKX',
|
||||||
|
'ext': 'm4a',
|
||||||
|
'title': 'あ',
|
||||||
|
'description': 'Twitter Space participated by nobody yet',
|
||||||
|
'uploader': '息根とめる🔪Twitchで復活',
|
||||||
|
'uploader_id': 'tomeru_ikinone',
|
||||||
|
'live_status': 'was_live',
|
||||||
|
'timestamp': 1685617198,
|
||||||
|
'upload_date': '20230601',
|
||||||
|
},
|
||||||
|
'params': {'skip_download': 'm3u8'},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
SPACE_STATUS = {
|
SPACE_STATUS = {
|
||||||
|
@ -1555,9 +1587,9 @@ def _real_extract(self, url):
|
||||||
source = traverse_obj(
|
source = traverse_obj(
|
||||||
self._call_api(f'live_video_stream/status/{metadata["media_key"]}', metadata['media_key']),
|
self._call_api(f'live_video_stream/status/{metadata["media_key"]}', metadata['media_key']),
|
||||||
('source', ('noRedirectPlaybackUrl', 'location'), {url_or_none}), get_all=False)
|
('source', ('noRedirectPlaybackUrl', 'location'), {url_or_none}), get_all=False)
|
||||||
formats = self._extract_m3u8_formats(
|
formats = self._extract_m3u8_formats( # XXX: Some Spaces need ffmpeg as downloader
|
||||||
source, metadata['media_key'], 'm4a', live=is_live, fatal=False,
|
source, metadata['media_key'], 'm4a', entry_protocol='m3u8', live=is_live,
|
||||||
headers={'Referer': 'https://twitter.com/'}) if source else []
|
headers={'Referer': 'https://twitter.com/'}, fatal=False) if source else []
|
||||||
for fmt in formats:
|
for fmt in formats:
|
||||||
fmt.update({'vcodec': 'none', 'acodec': 'aac'})
|
fmt.update({'vcodec': 'none', 'acodec': 'aac'})
|
||||||
if not is_live:
|
if not is_live:
|
||||||
|
|
Loading…
Reference in a new issue