diff options
author | Déstin Reed <[email protected]> | 2016-08-19 22:59:26 +0200 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2016-08-20 04:50:39 +0700 |
commit | 5b9d187cc6545c0c5209a4db5525b1023ca8ea41 (patch) | |
tree | fbd6cf8567f2e53b024e688bba1bef3be9d185c3 | |
parent | 39e1c4f08c4cfca81943e73523bd66b890f5aff2 (diff) | |
download | youtube-dl-5b9d187cc6545c0c5209a4db5525b1023ca8ea41.tar.gz youtube-dl-5b9d187cc6545c0c5209a4db5525b1023ca8ea41.zip |
[imdb] Improve title extraction and make thumbnail non-fatal
-rw-r--r-- | youtube_dl/extractor/imdb.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/imdb.py b/youtube_dl/extractor/imdb.py index 0acce9f4c..3a6a6f5ad 100644 --- a/youtube_dl/extractor/imdb.py +++ b/youtube_dl/extractor/imdb.py @@ -6,6 +6,7 @@ from .common import InfoExtractor from ..utils import ( mimetype2ext, qualities, + remove_end, ) @@ -19,7 +20,7 @@ class ImdbIE(InfoExtractor): 'info_dict': { 'id': '2524815897', 'ext': 'mp4', - 'title': 'Ice Age: Continental Drift Trailer (No. 2) - IMDb', + 'title': 'Ice Age: Continental Drift Trailer (No. 2)', 'description': 'md5:9061c2219254e5d14e03c25c98e96a81', } }, { @@ -83,10 +84,10 @@ class ImdbIE(InfoExtractor): return { 'id': video_id, - 'title': self._og_search_title(webpage), + 'title': remove_end(self._og_search_title(webpage), ' - IMDb'), 'formats': formats, 'description': descr, - 'thumbnail': format_info['slate'], + 'thumbnail': format_info.get('slate'), } |