mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-10-31 22:55:26 +00:00
[vine] Make sure the title won't be empty
And fix a relevant TwitterCard test case
This commit is contained in:
parent
9be31e771c
commit
e8f20ffa03
3 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
version <unreleased>
|
version <unreleased>
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
* [vine] Make sure the title won't be empty
|
||||||
+ [twitter] Support HLS streams in vmap URLs
|
+ [twitter] Support HLS streams in vmap URLs
|
||||||
+ [periscope] Support pscp.tv URLs in embedded frames
|
+ [periscope] Support pscp.tv URLs in embedded frames
|
||||||
* [niconico] Fix authentication error handling (#12486)
|
* [niconico] Fix authentication error handling (#12486)
|
||||||
|
|
|
@ -91,6 +91,7 @@ class TwitterCardIE(TwitterBaseIE):
|
||||||
'uploader_id': '1189339351084113920',
|
'uploader_id': '1189339351084113920',
|
||||||
'uploader': 'ArsenalTerje',
|
'uploader': 'ArsenalTerje',
|
||||||
'title': 'Vine by ArsenalTerje',
|
'title': 'Vine by ArsenalTerje',
|
||||||
|
'timestamp': 1447451307,
|
||||||
},
|
},
|
||||||
'add_ie': ['Vine'],
|
'add_ie': ['Vine'],
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -92,10 +92,12 @@ class VineIE(InfoExtractor):
|
||||||
|
|
||||||
username = data.get('username')
|
username = data.get('username')
|
||||||
|
|
||||||
|
alt_title = 'Vine by %s' % username if username else None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': data.get('description'),
|
'title': data.get('description') or alt_title or 'Vine video',
|
||||||
'alt_title': 'Vine by %s' % username if username else None,
|
'alt_title': alt_title,
|
||||||
'thumbnail': data.get('thumbnailUrl'),
|
'thumbnail': data.get('thumbnailUrl'),
|
||||||
'timestamp': unified_timestamp(data.get('created')),
|
'timestamp': unified_timestamp(data.get('created')),
|
||||||
'uploader': username,
|
'uploader': username,
|
||||||
|
|
Loading…
Reference in a new issue