소스 검색

[dramafever] Improve geo restriction detection and use geo bypass mechanism

Sergey M․ 8 년 전
부모
커밋
d392005a79
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      youtube_dl/extractor/dramafever.py

+ 3 - 2
youtube_dl/extractor/dramafever.py

@@ -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('.')