From 63b1ad0f05aa2cbb408b0e9112124b049a664377 Mon Sep 17 00:00:00 2001 From: i6t <62123048+i6t@users.noreply.github.com> Date: Wed, 25 Aug 2021 06:36:15 +0900 Subject: [PATCH] [iwara] Add thumbnail (#781) Authored by: i6t --- yt_dlp/extractor/iwara.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yt_dlp/extractor/iwara.py b/yt_dlp/extractor/iwara.py index 907d5fc8b..dae3da32c 100644 --- a/yt_dlp/extractor/iwara.py +++ b/yt_dlp/extractor/iwara.py @@ -72,6 +72,10 @@ def _real_extract(self, url): title = remove_end(self._html_search_regex( r'([^<]+)', webpage, 'title'), ' | Iwara') + thumbnail = self._html_search_regex( + r']+id=[\'"]video-player[\'"][^>]+poster=[\'"]([^\'"]+)', + webpage, 'thumbnail', default=None) + formats = [] for a_format in video_data: format_uri = url_or_none(a_format.get('uri')) @@ -96,4 +100,5 @@ def _real_extract(self, url): 'title': title, 'age_limit': age_limit, 'formats': formats, + 'thumbnail': self._proto_relative_url(thumbnail, 'https:'), }