[downloader/dash] Honor HTTP headers when downloading fragments
authorSergey M․ <dstftw@gmail.com>
Sat, 18 Feb 2017 21:18:22 +0000 (04:18 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 18 Feb 2017 21:18:22 +0000 (04:18 +0700)
For example, https://www.oppetarkiv.se/video/1196142/natten-ar-dagens-mor

youtube_dl/downloader/dash.py

index 8437dde30ca2afe031afb1ff2882ed12ac4b49b5..e2ddc369e03d03e46bde671c751018f290bf6e59 100644 (file)
@@ -43,7 +43,10 @@ class DashSegmentsFD(FragmentFD):
             count = 0
             while count <= fragment_retries:
                 try:
-                    success = ctx['dl'].download(target_filename, {'url': segment_url})
+                    success = ctx['dl'].download(target_filename, {
+                        'url': segment_url,
+                        'http_headers': info_dict.get('http_headers'),
+                    })
                     if not success:
                         return False
                     down, target_sanitized = sanitize_open(target_filename, 'rb')