mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 01:25:06 +00:00
[ndr] Improve thumbnail extraction
This commit is contained in:
parent
8dfa187b8a
commit
4ea5c7b70d
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ def _real_extract(self, url):
|
||||||
thumbnails = re.findall(r'''\d+: {src: "([^"]+)"(?: \|\| '[^']+')?, quality: '([^']+)'}''', page)
|
thumbnails = re.findall(r'''\d+: {src: "([^"]+)"(?: \|\| '[^']+')?, quality: '([^']+)'}''', page)
|
||||||
if thumbnails:
|
if thumbnails:
|
||||||
QUALITIES = ['xs', 's', 'm', 'l', 'xl']
|
QUALITIES = ['xs', 's', 'm', 'l', 'xl']
|
||||||
thumbnails.sort(key=lambda thumb: QUALITIES.index(thumb[1]))
|
thumbnails.sort(key=lambda thumb: QUALITIES.index(thumb[1]) if thumb[1] in QUALITIES else -1)
|
||||||
thumbnail = 'http://www.ndr.de' + thumbnails[-1][0]
|
thumbnail = 'http://www.ndr.de' + thumbnails[-1][0]
|
||||||
|
|
||||||
for format_id in ['lo', 'hi', 'hq']:
|
for format_id in ['lo', 'hi', 'hq']:
|
||||||
|
|
Loading…
Reference in a new issue