mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 20:55:52 +01:00
[mlb] Fix thumbnails extraction (Closes #3905)
This commit is contained in:
parent
ced659bb4d
commit
385009fc44
@ -88,8 +88,9 @@ def _real_extract(self, url):
|
|||||||
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(
|
thumbnails = [{
|
||||||
detail, './thumbnailScenarios/thumbnailScenario', 'type', '45').text
|
'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 @@ def _real_extract(self, url):
|
|||||||
'duration': duration,
|
'duration': duration,
|
||||||
'timestamp': timestamp,
|
'timestamp': timestamp,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'thumbnail': thumbnail,
|
'thumbnails': thumbnails,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user