diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2017-07-11 16:05:15 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2017-07-11 16:05:15 +0800 |
commit | e8f20ffa032a791548a66bb7b694c424673537e6 (patch) | |
tree | addef2672ca2777faff3107fc22006f5d956565d /youtube_dl/extractor/vine.py | |
parent | 9be31e771cd9481ea690c01eed398645deadc1de (diff) |
[vine] Make sure the title won't be empty
And fix a relevant TwitterCard test case
Diffstat (limited to 'youtube_dl/extractor/vine.py')
-rw-r--r-- | youtube_dl/extractor/vine.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vine.py b/youtube_dl/extractor/vine.py index 4957a07f7..46950d3a1 100644 --- a/youtube_dl/extractor/vine.py +++ b/youtube_dl/extractor/vine.py @@ -92,10 +92,12 @@ class VineIE(InfoExtractor): username = data.get('username') + alt_title = 'Vine by %s' % username if username else None + return { 'id': video_id, - 'title': data.get('description'), - 'alt_title': 'Vine by %s' % username if username else None, + 'title': data.get('description') or alt_title or 'Vine video', + 'alt_title': alt_title, 'thumbnail': data.get('thumbnailUrl'), 'timestamp': unified_timestamp(data.get('created')), 'uploader': username, |