aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M. <dstftw@gmail.com>2014-02-20 18:49:39 +0700
committerSergey M. <dstftw@gmail.com>2014-02-20 18:50:34 +0700
commit280bc5dad651728e493b3b25a672a9aaef590683 (patch)
tree50858089b47b55181666a63e29d0b6a81d419a0f /youtube_dl
parentf43770d8c93349ad6da26269bdde4c06c8e8b49e (diff)
[bbccouk] Add friendly contry filter error message (#2184)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/bbccouk.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/bbccouk.py b/youtube_dl/extractor/bbccouk.py
index 69d128974..75e608f99 100644
--- a/youtube_dl/extractor/bbccouk.py
+++ b/youtube_dl/extractor/bbccouk.py
@@ -162,6 +162,11 @@ class BBCCoUkIE(SubtitlesInfoExtractor):
mobj = re.match(self._VALID_URL, url)
group_id = mobj.group('id')
+ webpage = self._download_webpage(url, group_id, 'Downloading video page')
+ if re.search(r'id="emp-error" class="notinuk">', webpage):
+ raise ExtractorError('Currently BBC iPlayer TV programmes are available to play in the UK only',
+ expected=True)
+
playlist = self._download_xml('http://www.bbc.co.uk/iplayer/playlist/%s' % group_id, group_id,
'Downloading playlist XML')