aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornixxo <nixxo@protonmail.com>2022-11-18 02:12:02 +0100
committerGitHub <noreply@github.com>2022-11-18 06:42:02 +0530
commit9a0416c6a5e87c577cb5079e75e3ae63ee948d80 (patch)
tree3d74f12651bcfc497f6c6d6a8c16761426ab1dc8
parentf5a9e9df0da38a0c3c13f1dd106d5eb585253f0c (diff)
downloadhypervideo-pre-9a0416c6a5e87c577cb5079e75e3ae63ee948d80.tar.lz
hypervideo-pre-9a0416c6a5e87c577cb5079e75e3ae63ee948d80.tar.xz
hypervideo-pre-9a0416c6a5e87c577cb5079e75e3ae63ee948d80.zip
[extractor/twitter:spaces] Add 'Referer' to m3u8 (#5580)
Closes #5565 Authored by: nixxo
-rw-r--r--yt_dlp/extractor/twitter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py
index 3c81473dc..62b34d081 100644
--- a/yt_dlp/extractor/twitter.py
+++ b/yt_dlp/extractor/twitter.py
@@ -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'})