Browse Source

[mlb] Fix thumbnails extraction (Closes #3905)

totalwebcasting
Sergey M․ 10 years ago
parent
commit
385009fc44
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      youtube_dl/extractor/mlb.py

+ 4
- 3
youtube_dl/extractor/mlb.py View File

@ -88,8 +88,9 @@ class MLBIE(InfoExtractor):
duration = parse_duration(detail.find('./duration').text) duration = parse_duration(detail.find('./duration').text)
timestamp = parse_iso8601(detail.attrib['date'][:-5]) 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 = [] formats = []
for media_url in detail.findall('./url'): for media_url in detail.findall('./url'):
@ -116,5 +117,5 @@ class MLBIE(InfoExtractor):
'duration': duration, 'duration': duration,
'timestamp': timestamp, 'timestamp': timestamp,
'formats': formats, 'formats': formats,
'thumbnail': thumbnail,
'thumbnails': thumbnails,
} }

Loading…
Cancel
Save