From 245d43cacfea78c04f8ce52e5a03267bb67b988f Mon Sep 17 00:00:00 2001 From: funniray Date: Mon, 9 Aug 2021 22:39:20 +0100 Subject: [PATCH] [crunchyroll] Fix thumbnail (#650) Authored by: funniray --- yt_dlp/extractor/crunchyroll.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/yt_dlp/extractor/crunchyroll.py b/yt_dlp/extractor/crunchyroll.py index 98aa1dd9a..091e15e8d 100644 --- a/yt_dlp/extractor/crunchyroll.py +++ b/yt_dlp/extractor/crunchyroll.py @@ -29,6 +29,7 @@ from ..utils import ( merge_dicts, remove_end, sanitized_Request, + try_get, urlencode_postdata, xpath_text, ) @@ -458,6 +459,18 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text video_description = (self._parse_json(self._html_search_regex( r']*>\s*.+?\[media_id=%s\].+?({.+?"description"\s*:.+?})\);' % video_id, webpage, 'description', default='{}'), video_id) or media_metadata).get('description') + + thumbnails = [] + thumbnail_url = (self._parse_json(self._html_search_regex( + r'