aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/ondemandkorea.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-02-19 03:53:23 +0700
committerSergey M <dstftw@gmail.com>2017-02-19 05:10:08 +0800
commit4248dad92bd87650c791194276296b148f668e68 (patch)
treee4c26e41802f4119b67830a61976c39c494b377e /youtube_dl/extractor/ondemandkorea.py
parent0a840f584c3f1fedb6957c05587dec697143f2d5 (diff)
Improve geo bypass mechanism
* Rename options to preffixly match with --geo-verification-proxy * Introduce _GEO_COUNTRIES for extractors * Implement faking IP right away for sites with known geo restriction
Diffstat (limited to 'youtube_dl/extractor/ondemandkorea.py')
-rw-r--r--youtube_dl/extractor/ondemandkorea.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/ondemandkorea.py b/youtube_dl/extractor/ondemandkorea.py
index 0c85d549e..df1ce3c1d 100644
--- a/youtube_dl/extractor/ondemandkorea.py
+++ b/youtube_dl/extractor/ondemandkorea.py
@@ -10,6 +10,7 @@ from ..utils import (
class OnDemandKoreaIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?ondemandkorea\.com/(?P<id>[^/]+)\.html'
+ _GEO_COUNTRIES = ['US', 'CA']
_TEST = {
'url': 'http://www.ondemandkorea.com/ask-us-anything-e43.html',
'info_dict': {
@@ -36,7 +37,7 @@ class OnDemandKoreaIE(InfoExtractor):
if 'msg_block_01.png' in webpage:
self.raise_geo_restricted(
msg='This content is not available in your region',
- countries=['US', 'CA'])
+ countries=self._GEO_COUNTRIES)
if 'This video is only available to ODK PLUS members.' in webpage:
raise ExtractorError(