]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Add thumbnail for metacafe
authorruuk <ruuk@users.noreply.github.com>
Tue, 25 Feb 2014 20:04:44 +0000 (12:04 -0800)
committerruuk <ruuk@users.noreply.github.com>
Tue, 25 Feb 2014 20:04:44 +0000 (12:04 -0800)
youtube_dl/extractor/metacafe.py

index 99d3c83a5e4c3a31d71e9f487e13930af498dc1f..364ba993b63721454a1d5012c029f9281de4d9f6 100644 (file)
@@ -166,6 +166,7 @@ class MetacafeIE(InfoExtractor):
 
         video_title = self._html_search_regex(r'(?im)<title>(.*) - Video</title>', webpage, u'title')
         description = self._og_search_description(webpage)
+        thumbnail = self._html_search_regex(r'<meta property="og:image" content="([^"].+?)(?is)"', webpage, u'thumbnail',default='')
         video_uploader = self._html_search_regex(
                 r'submitter=(.*?);|googletag\.pubads\(\)\.setTargeting\("(?:channel|submiter)","([^"]+)"\);',
                 webpage, u'uploader nickname', fatal=False)
@@ -183,6 +184,7 @@ class MetacafeIE(InfoExtractor):
             'uploader': video_uploader,
             'upload_date':  None,
             'title':    video_title,
+            'thumbnail':thumbnail,
             'ext':      video_ext,
             'age_limit': age_limit,
         }