aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/bbc.py
diff options
context:
space:
mode:
authorfnord <fnord@fnord.mobi>2015-06-25 00:31:32 -0500
committerfnord <fnord@fnord.mobi>2015-06-25 00:34:26 -0500
commitda92eeae42f556926cb676b3c14e270603b7e38e (patch)
treeb9ec5182b4b4028897399db4f2b4297d557b1f82 /youtube_dl/extractor/bbc.py
parenta9dcf4a860214e37971ab05f27f74bbae65ff8ae (diff)
Fix tests, description formatting
Diffstat (limited to 'youtube_dl/extractor/bbc.py')
-rw-r--r--youtube_dl/extractor/bbc.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/youtube_dl/extractor/bbc.py b/youtube_dl/extractor/bbc.py
index fed344ea0..bb671d473 100644
--- a/youtube_dl/extractor/bbc.py
+++ b/youtube_dl/extractor/bbc.py
@@ -428,6 +428,8 @@ class BBCNewsIE(BBCCoUkIE):
'title': 'Aerial footage showed the site of the crash in the Alps - courtesy BFM TV',
'description': 'Germanwings plane crash site in aerial video - Aerial footage showed the site of the crash in the Alps - courtesy BFM TV',
'duration': 47,
+ 'upload_date': '20150324',
+ 'uploader': 'BBC News',
},
'params': {
'skip_download': True,
@@ -438,8 +440,11 @@ class BBCNewsIE(BBCCoUkIE):
'info_dict': {
'id': 'NA',
'ext': 'mp4',
- 'title': 'YPG - Tel Abyad..n tamam. kontrol.m.zde',
+ 'title': 'YPG: Tel Abyad\'\u0131n tamam\u0131 kontrol\xfcm\xfczde',
+ 'description': 'YPG: Tel Abyad\'\u0131n tamam\u0131 kontrol\xfcm\xfczde',
'duration': 47,
+ 'upload_date': '20150615',
+ 'uploader': 'BBC News',
},
'params': {
'skip_download': True,
@@ -450,8 +455,11 @@ class BBCNewsIE(BBCCoUkIE):
'info_dict': {
'id': '39275083',
'ext': 'mp4',
- 'title': 'Honduras militariza sus hospitales por nuevo esc.ndalo de corrupci.n',
+ 'title': 'Honduras militariza sus hospitales por nuevo esc\xe1ndalo de corrupci\xf3n',
+ 'description': 'Honduras militariza sus hospitales por nuevo esc\xe1ndalo de corrupci\xf3n',
'duration': 87,
+ 'upload_date': '20150619',
+ 'uploader': 'BBC News',
},
'params': {
'skip_download': True,
@@ -507,7 +515,9 @@ class BBCNewsIE(BBCCoUkIE):
title = jent.get('caption',list_title)
duration = parse_duration(jent.get('duration'))
- description = list_title + ' - ' + jent.get('caption','')
+ description = list_title
+ if jent.get('caption'):
+ description += ' - ' + jent.get('caption')
thumbnail = None
if jent.has_key('image'):
thumbnail=jent['image'].get('href')
@@ -539,8 +549,12 @@ class BBCNewsIE(BBCCoUkIE):
self._sort_formats(formats)
+ id = jent.get('id') if programme_id == None else programme_id
+ if id == None:
+ id = 'NA'
+
ret.append( {
- 'id': jent.get('id') if programme_id == None else programme_id,
+ 'id': id,
'uploader': 'BBC News',
'upload_date': pubdate,
'title': title,