]> jfr.im git - yt-dlp.git/commitdiff
[extractor/twitter:spaces] Add 'Referer' to m3u8 (#5580)
authornixxo <redacted>
Fri, 18 Nov 2022 01:12:02 +0000 (02:12 +0100)
committerGitHub <redacted>
Fri, 18 Nov 2022 01:12:02 +0000 (06:42 +0530)
Closes #5565
Authored by: nixxo

yt_dlp/extractor/twitter.py

index 3c81473dc8f1d9b2102670f660e931089b68d2d0..62b34d0813e9decc581d9a9f889cacec91a68d4d 100644 (file)
@@ -1167,7 +1167,8 @@ def _real_extract(self, url):
             # 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'})