aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authori6t <62123048+i6t@users.noreply.github.com>2021-08-25 06:36:15 +0900
committerGitHub <noreply@github.com>2021-08-25 03:06:15 +0530
commit63b1ad0f05aa2cbb408b0e9112124b049a664377 (patch)
tree5fa800bf8834fc9081f371e2b6eb17e3176b86d9
parent0bb1bc1b107b9c3d68ea0c887bd09cad75d7714d (diff)
downloadhypervideo-pre-63b1ad0f05aa2cbb408b0e9112124b049a664377.tar.lz
hypervideo-pre-63b1ad0f05aa2cbb408b0e9112124b049a664377.tar.xz
hypervideo-pre-63b1ad0f05aa2cbb408b0e9112124b049a664377.zip
[iwara] Add thumbnail (#781)
Authored by: i6t
-rw-r--r--yt_dlp/extractor/iwara.py5
1 files changed, 5 insertions, 0 deletions
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 @@ class IwaraIE(InfoExtractor):
title = remove_end(self._html_search_regex(
r'<title>([^<]+)</title>', webpage, 'title'), ' | Iwara')
+ thumbnail = self._html_search_regex(
+ r'<video[^>]+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 @@ class IwaraIE(InfoExtractor):
'title': title,
'age_limit': age_limit,
'formats': formats,
+ 'thumbnail': self._proto_relative_url(thumbnail, 'https:'),
}