aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-03-06 03:23:01 +0700
committerSergey M․ <dstftw@gmail.com>2017-03-06 03:23:42 +0700
commit96182695e4e37795a30ab143129c91dab18a9865 (patch)
tree115cb1452664a8f5b74f89ac8d0c147c336a906d /youtube_dl
parentfc11ad383311d721179483eea2e289e3a236e457 (diff)
downloadyoutube-dl-96182695e4e37795a30ab143129c91dab18a9865.tar.xz
[drtv] Add geo countries to GeoRestrictedError
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/drtv.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/drtv.py b/youtube_dl/extractor/drtv.py
index b879f2c2b..e4917014a 100644
--- a/youtube_dl/extractor/drtv.py
+++ b/youtube_dl/extractor/drtv.py
@@ -15,6 +15,8 @@ from ..utils import (
class DRTVIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?dr\.dk/(?:tv/se|nyheder|radio/ondemand)/(?:[^/]+/)*(?P<id>[\da-z-]+)(?:[/#?]|$)'
+ _GEO_BYPASS = False
+ _GEO_COUNTRIES = ['DK']
IE_NAME = 'drtv'
_TESTS = [{
'url': 'https://www.dr.dk/tv/se/boern/ultra/klassen-ultra/klassen-darlig-taber-10',
@@ -137,7 +139,7 @@ class DRTVIE(InfoExtractor):
if not formats and restricted_to_denmark:
self.raise_geo_restricted(
'Unfortunately, DR is not allowed to show this program outside Denmark.',
- expected=True)
+ countries=self._GEO_COUNTRIES)
self._sort_formats(formats)