projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f43770d
)
[bbccouk] Add friendly contry filter error message (#2184)
author
Sergey M.
<dstftw@gmail.com>
Thu, 20 Feb 2014 11:49:39 +0000
(18:49 +0700)
committer
Sergey M.
<dstftw@gmail.com>
Thu, 20 Feb 2014 11:50:34 +0000
(18:50 +0700)
youtube_dl/extractor/bbccouk.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/bbccouk.py
b/youtube_dl/extractor/bbccouk.py
index 69d128974d21ef7cdd5da0505a60addc3acc2ef7..75e608f99de4ff3cc14234ab370f370b1ae83940 100644
(file)
--- 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')