aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/go.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/extractor/go.py')
-rw-r--r--youtube_dl/extractor/go.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/go.py b/youtube_dl/extractor/go.py
index f28e6fbf5..ec902c670 100644
--- a/youtube_dl/extractor/go.py
+++ b/youtube_dl/extractor/go.py
@@ -101,6 +101,10 @@ class GoIE(AdobePassIE):
video_id, data=urlencode_postdata(data), headers=self.geo_verification_headers())
errors = entitlement.get('errors', {}).get('errors', [])
if errors:
+ for error in errors:
+ if error.get('code') == 1002:
+ self.raise_geo_restricted(
+ error['message'], countries=['US'])
error_message = ', '.join([error['message'] for error in errors])
raise ExtractorError('%s said: %s' % (self.IE_NAME, error_message), expected=True)
asset_url += '?' + entitlement['uplynkData']['sessionKey']