mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-10 02:43:44 +00:00
safer _extract_thumbnails
Authored by: bashonly
This commit is contained in:
parent
6464bfa78c
commit
64153536ad
@ -155,14 +155,14 @@ class ZDFBaseIE(InfoExtractor):
|
||||
@staticmethod
|
||||
def _extract_thumbnails(source):
|
||||
return [{
|
||||
'id': format_id,
|
||||
'id': str(format_id),
|
||||
'url': url,
|
||||
'preference': 1 if format_id == 'original' else 0,
|
||||
**traverse_obj(re.search(r'(?P<width>\d+|auto)[Xx](?P<height>\d+|auto)', format_id), {
|
||||
**traverse_obj(re.search(r'(?P<width>\d+|auto)[Xx](?P<height>\d+|auto)', str(format_id)), {
|
||||
'width': ('width', {int_or_none}),
|
||||
'height': ('height', {int_or_none}),
|
||||
}),
|
||||
} for format_id, url in (source or {}).items() if url]
|
||||
} for format_id, url in traverse_obj(source, ({dict.items}, lambda _, v: url_or_none(v[1])))]
|
||||
|
||||
|
||||
class ZDFIE(ZDFBaseIE):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user