aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/discovery.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/discovery.py')
-rw-r--r--youtube_dl/extractor/discovery.py7
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(