0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-12-28 01:41:06 +00:00

[iwara] Add thumbnail (#781)

Authored by: i6t
This commit is contained in:
i6t 2021-08-25 06:36:15 +09:00 committed by GitHub
parent 0bb1bc1b10
commit 63b1ad0f05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,6 +72,10 @@ def _real_extract(self, url):
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 @@ def _real_extract(self, url):
'title': title,
'age_limit': age_limit,
'formats': formats,
'thumbnail': self._proto_relative_url(thumbnail, 'https:'),
}