diff options
author | nyuszika7h <nyuszika7h@gmail.com> | 2019-01-02 17:46:07 +0100 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2019-01-02 23:46:07 +0700 |
commit | 2122d7151deca9c7047426320cd73152cb907afa (patch) | |
tree | 9523f3e3d8a9d82275a1c9eb19d19df5052da08c /youtube_dl | |
parent | 751e051557372ab3fa41d839e7e6a149aa2d04b8 (diff) |
[discovery] Use geo verification headers
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/discovery.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/discovery.py b/youtube_dl/extractor/discovery.py index 44fbc41bb..b70c307a7 100644 --- a/youtube_dl/extractor/discovery.py +++ b/youtube_dl/extractor/discovery.py @@ -94,11 +94,12 @@ class DiscoveryIE(DiscoveryGoBaseIE): })['access_token'] try: + headers = self.geo_verification_headers() + headers['Authorization'] = 'Bearer ' + access_token + stream = self._download_json( 'https://api.discovery.com/v1/streaming/video/' + video_id, - display_id, headers={ - 'Authorization': 'Bearer ' + access_token, - }) + display_id, headers=headers) except ExtractorError as e: if isinstance(e.cause, compat_HTTPError) and e.cause.code in (401, 403): e_description = self._parse_json( |