[imdb] Improve title extraction and make thumbnail non-fatal

This commit is contained in:
Déstin Reed 2016-08-19 22:59:26 +02:00 committed by Sergey M․
parent 39e1c4f08c
commit 5b9d187cc6
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 4 additions and 3 deletions

View File

@ -6,6 +6,7 @@ from .common import InfoExtractor
from ..utils import ( from ..utils import (
mimetype2ext, mimetype2ext,
qualities, qualities,
remove_end,
) )
@ -19,7 +20,7 @@ class ImdbIE(InfoExtractor):
'info_dict': { 'info_dict': {
'id': '2524815897', 'id': '2524815897',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Ice Age: Continental Drift Trailer (No. 2) - IMDb', 'title': 'Ice Age: Continental Drift Trailer (No. 2)',
'description': 'md5:9061c2219254e5d14e03c25c98e96a81', 'description': 'md5:9061c2219254e5d14e03c25c98e96a81',
} }
}, { }, {
@ -83,10 +84,10 @@ class ImdbIE(InfoExtractor):
return { return {
'id': video_id, 'id': video_id,
'title': self._og_search_title(webpage), 'title': remove_end(self._og_search_title(webpage), ' - IMDb'),
'formats': formats, 'formats': formats,
'description': descr, 'description': descr,
'thumbnail': format_info['slate'], 'thumbnail': format_info.get('slate'),
} }