commit 2122d7151deca9c7047426320cd73152cb907afa
parent 751e051557372ab3fa41d839e7e6a149aa2d04b8
Author: nyuszika7h <nyuszika7h@gmail.com>
Date:   Wed,  2 Jan 2019 17:46:07 +0100

[discovery] Use geo verification headers


Diffstat:
Myoutube_dl/extractor/discovery.py | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 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(