diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-02-19 22:28:27 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-02-19 22:28:27 +0700 |
commit | 18d7aa6efa6c85f1e07e4e1ecd42c7dd5fd7da99 (patch) | |
tree | ee82871950871e2024a518db10574129b40e1b38 | |
parent | b12cf31bb1493ba461ab8663a63b7f42164617da (diff) |
[brightcove:new] Use referrer for formats' HTTP headers
-rw-r--r-- | youtube_dl/extractor/brightcove.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index f3c0dc3fa..0e4eaef65 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -564,7 +564,7 @@ class BrightcoveNewIE(AdobePassIE): return entries - def _parse_brightcove_metadata(self, json_data, video_id): + def _parse_brightcove_metadata(self, json_data, video_id, headers={}): title = json_data['name'].strip() formats = [] @@ -638,6 +638,9 @@ class BrightcoveNewIE(AdobePassIE): self._sort_formats(formats) + for f in formats: + f.setdefault('http_headers', {}).update(headers) + subtitles = {} for text_track in json_data.get('text_tracks', []): if text_track.get('src'): @@ -724,4 +727,5 @@ class BrightcoveNewIE(AdobePassIE): 'tveToken': tve_token, }) - return self._parse_brightcove_metadata(json_data, video_id) + return self._parse_brightcove_metadata( + json_data, video_id, headers=headers) |