]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[mlb] Fix thumbnails extraction (Closes #3905)
authorSergey M․ <dstftw@gmail.com>
Thu, 9 Oct 2014 12:56:55 +0000 (19:56 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 9 Oct 2014 12:56:55 +0000 (19:56 +0700)
youtube_dl/extractor/mlb.py

index bfdb462ebaf663df7d7c4f3c1618988f0aa1d1e3..362c2b5c9815d79f6ce22220eef1065c796e0ff7 100644 (file)
@@ -88,8 +88,9 @@ class MLBIE(InfoExtractor):
         duration = parse_duration(detail.find('./duration').text)
         timestamp = parse_iso8601(detail.attrib['date'][:-5])
 
-        thumbnail = find_xpath_attr(
-            detail, './thumbnailScenarios/thumbnailScenario', 'type', '45').text
+        thumbnails = [{
+            'url': thumbnail.text,
+        } for thumbnail in detail.findall('./thumbnailScenarios/thumbnailScenario')]
 
         formats = []
         for media_url in detail.findall('./url'):
@@ -116,5 +117,5 @@ class MLBIE(InfoExtractor):
             'duration': duration,
             'timestamp': timestamp,
             'formats': formats,
-            'thumbnail': thumbnail,
+            'thumbnails': thumbnails,
         }