diff options
author | Yen Chi Hsuan <[email protected]> | 2015-12-05 16:45:24 +0800 |
---|---|---|
committer | Yen Chi Hsuan <[email protected]> | 2015-12-05 16:55:53 +0800 |
commit | 679bacf0b5bea22944cf95acd1fdeb064b98d7c7 (patch) | |
tree | 9ffebbe8fb762ecdf1baca0d77f0439b8ff727d5 | |
parent | 02e3952f3b2a289dd69ee2f922d7e8f5d8759e4d (diff) | |
download | youtube-dl-679bacf0b5bea22944cf95acd1fdeb064b98d7c7.tar.gz youtube-dl-679bacf0b5bea22944cf95acd1fdeb064b98d7c7.zip |
[bbc.co.uk] Fix test_BBCCoUk
This is similar to the one in #7756, So also fixes #7756.
-rw-r--r-- | youtube_dl/extractor/bbc.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/extractor/bbc.py b/youtube_dl/extractor/bbc.py index 7fb80aa38..cd129ba71 100644 --- a/youtube_dl/extractor/bbc.py +++ b/youtube_dl/extractor/bbc.py @@ -47,9 +47,8 @@ class BBCCoUkIE(InfoExtractor): 'info_dict': { 'id': 'b039d07m', 'ext': 'flv', - 'title': 'Kaleidoscope, Leonard Cohen', + 'title': 'Leonard Cohen, Kaleidoscope - BBC Radio 4', 'description': 'The Canadian poet and songwriter reflects on his musical career.', - 'duration': 1740, }, 'params': { # rtmp download @@ -454,6 +453,7 @@ class BBCCoUkIE(InfoExtractor): webpage = self._download_webpage(url, group_id, 'Downloading video page') programme_id = None + duration = None tviplayer = self._search_regex( r'mediator\.bind\(({.+?})\s*,\s*document\.getElementById', @@ -473,7 +473,9 @@ class BBCCoUkIE(InfoExtractor): title = self._og_search_title(webpage) description = self._search_regex( r'<p class="[^"]*medium-description[^"]*">([^<]+)</p>', - webpage, 'description', fatal=False) + webpage, 'description', default=None) + if not description: + description = self._html_search_meta('description', webpage) else: programme_id, title, description, duration, formats, subtitles = self._download_playlist(group_id) |