mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-12 14:26:49 +01:00
Fix tests, description formatting
This commit is contained in:
parent
a9dcf4a860
commit
da92eeae42
@ -428,6 +428,8 @@ class BBCNewsIE(BBCCoUkIE):
|
|||||||
'title': 'Aerial footage showed the site of the crash in the Alps - courtesy BFM TV',
|
'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',
|
'description': 'Germanwings plane crash site in aerial video - Aerial footage showed the site of the crash in the Alps - courtesy BFM TV',
|
||||||
'duration': 47,
|
'duration': 47,
|
||||||
|
'upload_date': '20150324',
|
||||||
|
'uploader': 'BBC News',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
@ -438,8 +440,11 @@ class BBCNewsIE(BBCCoUkIE):
|
|||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'NA',
|
'id': 'NA',
|
||||||
'ext': 'mp4',
|
'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,
|
'duration': 47,
|
||||||
|
'upload_date': '20150615',
|
||||||
|
'uploader': 'BBC News',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
@ -450,8 +455,11 @@ class BBCNewsIE(BBCCoUkIE):
|
|||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '39275083',
|
'id': '39275083',
|
||||||
'ext': 'mp4',
|
'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,
|
'duration': 87,
|
||||||
|
'upload_date': '20150619',
|
||||||
|
'uploader': 'BBC News',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
@ -507,7 +515,9 @@ def _real_extract(self, url):
|
|||||||
title = jent.get('caption',list_title)
|
title = jent.get('caption',list_title)
|
||||||
|
|
||||||
duration = parse_duration(jent.get('duration'))
|
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
|
thumbnail = None
|
||||||
if jent.has_key('image'):
|
if jent.has_key('image'):
|
||||||
thumbnail=jent['image'].get('href')
|
thumbnail=jent['image'].get('href')
|
||||||
@ -539,8 +549,12 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
id = jent.get('id') if programme_id == None else programme_id
|
||||||
|
if id == None:
|
||||||
|
id = 'NA'
|
||||||
|
|
||||||
ret.append( {
|
ret.append( {
|
||||||
'id': jent.get('id') if programme_id == None else programme_id,
|
'id': id,
|
||||||
'uploader': 'BBC News',
|
'uploader': 'BBC News',
|
||||||
'upload_date': pubdate,
|
'upload_date': pubdate,
|
||||||
'title': title,
|
'title': title,
|
||||||
|
Loading…
Reference in New Issue
Block a user