Browse Source

[bbccouk] Add friendly contry filter error message (#2184)

master
Sergey M. 10 years ago
parent
commit
280bc5dad6
1 changed files with 5 additions and 0 deletions
  1. 5
      youtube_dl/extractor/bbccouk.py

5
youtube_dl/extractor/bbccouk.py

@ -162,6 +162,11 @@ class BBCCoUkIE(SubtitlesInfoExtractor):
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)
group_id = mobj.group('id') 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, playlist = self._download_xml('http://www.bbc.co.uk/iplayer/playlist/%s' % group_id, group_id,
'Downloading playlist XML') 'Downloading playlist XML')

Loading…
Cancel
Save