[dramafever] Improve geo restriction detection and use geo bypass mechanism
authorSergey M․ <dstftw@gmail.com>
Sat, 4 Feb 2017 11:51:16 +0000 (18:51 +0700)
committerSergey M <dstftw@gmail.com>
Sat, 18 Feb 2017 21:10:08 +0000 (05:10 +0800)
youtube_dl/extractor/dramafever.py

index bcd9fe2a039550d36af3f1a63cb3cf8cc583cb2a..755db806aba06e2cb1f46fc6b4dc5ff9c275976e 100644 (file)
@@ -116,8 +116,9 @@ class DramaFeverIE(DramaFeverBaseIE):
                 'http://www.dramafever.com/amp/episode/feed.json?guid=%s' % video_id)
         except ExtractorError as e:
             if isinstance(e.cause, compat_HTTPError):
-                raise ExtractorError(
-                    'Currently unavailable in your country.', expected=True)
+                self.raise_geo_restricted(
+                    msg='Currently unavailable in your country',
+                    countries=['US', 'CA'])
             raise
 
         series_id, episode_number = video_id.split('.')