[srgssr] Improve geo restriction detection
[youtube-dl] / youtube_dl / extractor / ondemandkorea.py
index de1d6b08a409ef79272393ccd3f98607f436e4a3..0c85d549eae76134337abed9eb1901ef4388258a 100644 (file)
@@ -1,14 +1,14 @@
 # coding: utf-8
 from __future__ import unicode_literals
 
-from .jwplatform import JWPlatformBaseIE
+from .common import InfoExtractor
 from ..utils import (
     ExtractorError,
     js_to_json,
 )
 
 
-class OnDemandKoreaIE(JWPlatformBaseIE):
+class OnDemandKoreaIE(InfoExtractor):
     _VALID_URL = r'https?://(?:www\.)?ondemandkorea\.com/(?P<id>[^/]+)\.html'
     _TEST = {
         'url': 'http://www.ondemandkorea.com/ask-us-anything-e43.html',
@@ -35,7 +35,8 @@ class OnDemandKoreaIE(JWPlatformBaseIE):
 
         if 'msg_block_01.png' in webpage:
             self.raise_geo_restricted(
-                'This content is not available in your region')
+                msg='This content is not available in your region',
+                countries=['US', 'CA'])
 
         if 'This video is only available to ODK PLUS members.' in webpage:
             raise ExtractorError(