mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 09:17:48 +00:00
[CSpan] Fix test cases CSpan_1 and CSpan_2
This commit is contained in:
parent
2fe1b5bd2a
commit
92dcba1e1c
1 changed files with 15 additions and 7 deletions
|
@ -37,11 +37,14 @@ class CSpanIE(InfoExtractor):
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.c-span.org/video/?318608-1/gm-ignition-switch-recall',
|
'url': 'http://www.c-span.org/video/?318608-1/gm-ignition-switch-recall',
|
||||||
|
'md5': '446562a736c6bf97118e389433ed88d4',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '342759',
|
'id': '342759',
|
||||||
|
'ext': 'mp4',
|
||||||
'title': 'General Motors Ignition Switch Recall',
|
'title': 'General Motors Ignition Switch Recall',
|
||||||
|
'duration': 14848,
|
||||||
|
'description': 'md5:70c7c3b8fa63fa60d42772440596034c'
|
||||||
},
|
},
|
||||||
'playlist_duration_sum': 14855,
|
|
||||||
}, {
|
}, {
|
||||||
# Video from senate.gov
|
# Video from senate.gov
|
||||||
'url': 'http://www.c-span.org/video/?104517-1/immigration-reforms-needed-protect-skilled-american-workers',
|
'url': 'http://www.c-span.org/video/?104517-1/immigration-reforms-needed-protect-skilled-american-workers',
|
||||||
|
@ -97,9 +100,14 @@ class CSpanIE(InfoExtractor):
|
||||||
'duration': int_or_none(f.get('length', {}).get('#text')),
|
'duration': int_or_none(f.get('length', {}).get('#text')),
|
||||||
} for partnum, f in enumerate(files)]
|
} for partnum, f in enumerate(files)]
|
||||||
|
|
||||||
return {
|
if len(entries) == 1:
|
||||||
'_type': 'playlist',
|
entry = dict(entries[0])
|
||||||
'entries': entries,
|
entry['id'] = video_id
|
||||||
'title': title,
|
return entry
|
||||||
'id': video_id,
|
else:
|
||||||
}
|
return {
|
||||||
|
'_type': 'playlist',
|
||||||
|
'entries': entries,
|
||||||
|
'title': title,
|
||||||
|
'id': video_id,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue