[extractor/twitter:spaces] Add 'Referer' to m3u8 (#5580)

Closes #5565
Authored by: nixxo
This commit is contained in:
nixxo 2022-11-18 02:12:02 +01:00 committed by GitHub
parent f5a9e9df0d
commit 9a0416c6a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1167,7 +1167,8 @@ class TwitterSpacesIE(TwitterBaseIE):
# XXX: Native downloader does not work
formats = self._extract_m3u8_formats(
traverse_obj(source, 'noRedirectPlaybackUrl', 'location'),
metadata['media_key'], 'm4a', 'm3u8', live=live_status == 'is_live')
metadata['media_key'], 'm4a', 'm3u8', live=live_status == 'is_live',
headers={'Referer': 'https://twitter.com/'})
for fmt in formats:
fmt.update({'vcodec': 'none', 'acodec': 'aac'})