]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[vevo] Catch the georestriction message (#7802)
authorYen Chi Hsuan <yan12125@gmail.com>
Fri, 11 Dec 2015 06:25:01 +0000 (14:25 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Fri, 11 Dec 2015 06:25:01 +0000 (14:25 +0800)
youtube_dl/extractor/vevo.py

index 571289421e2d63e9e55b036a54ee952e98ccfead..61813301a832bf060b35580007548d6144f0a9b3 100644 (file)
@@ -81,6 +81,9 @@ class VevoIE(InfoExtractor):
         if webpage is False:
             self._oauth_token = None
         else:
+            if 'THIS PAGE IS CURRENTLY UNAVAILABLE IN YOUR REGION' in webpage:
+                raise ExtractorError('%s said: This page is currently unavailable in your region.' % self.IE_NAME, expected=True)
+
             self._oauth_token = self._search_regex(
                 r'access_token":\s*"([^"]+)"',
                 webpage, 'access token', fatal=False)