aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/bbccouk.py
diff options
context:
space:
mode:
authorfnord <fnord@fnord.mobi>2015-06-19 01:52:25 -0500
committerfnord <fnord@fnord.mobi>2015-06-19 01:52:25 -0500
commita8b081a0523c412fd4e01d5cddec7ae382c4793e (patch)
treea9a39616265df2a82e7a9cb0ced62abc23a71db2 /youtube_dl/extractor/bbccouk.py
parent9e96dc8b3561c1e6e62ce6a34efba485e5e49054 (diff)
BBCNewsIE: eliminate redundant function.
BBCCoUkIE._download_media_selector: use class variable instead of hardcoded string for mediaselector_url template.
Diffstat (limited to 'youtube_dl/extractor/bbccouk.py')
-rw-r--r--youtube_dl/extractor/bbccouk.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/bbccouk.py b/youtube_dl/extractor/bbccouk.py
index 0305f88b5..dcc5fc2fa 100644
--- a/youtube_dl/extractor/bbccouk.py
+++ b/youtube_dl/extractor/bbccouk.py
@@ -15,6 +15,8 @@ class BBCCoUkIE(InfoExtractor):
IE_DESC = 'BBC iPlayer'
_VALID_URL = r'https?://(?:www\.)?bbc\.co\.uk/(?:(?:(?:programmes|iplayer(?:/[^/]+)?/(?:episode|playlist))/)|music/clips[/#])(?P<id>[\da-z]{8})'
+ mediaselector_url = 'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/pc/vpid/%s'
+
_TESTS = [
{
'url': 'http://www.bbc.co.uk/programmes/b039g8p7',
@@ -277,7 +279,7 @@ class BBCCoUkIE(InfoExtractor):
def _download_media_selector(self, programme_id):
try:
media_selection = self._download_xml(
- 'http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/pc/vpid/%s' % programme_id,
+ self.mediaselector_url % programme_id,
programme_id, 'Downloading media selection XML')
except ExtractorError as ee:
if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403: