diff options
author | Sergey M․ <dstftw@gmail.com> | 2014-10-09 19:56:55 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2014-10-09 19:56:55 +0700 |
commit | 385009fc443eb81dc8695dd46448950bbe76cce3 (patch) | |
tree | f584c1ed169d16e9d8e406526630ca0a0726c970 | |
parent | ced659bb4d066c782a009d370daff0fedb7b1006 (diff) |
[mlb] Fix thumbnails extraction (Closes #3905)
-rw-r--r-- | youtube_dl/extractor/mlb.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/youtube_dl/extractor/mlb.py b/youtube_dl/extractor/mlb.py index bfdb462eb..362c2b5c9 100644 --- a/youtube_dl/extractor/mlb.py +++ b/youtube_dl/extractor/mlb.py @@ -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, } |