[redtube] Fix exts

Closes #464
This commit is contained in:
pukkandan 2021-09-05 05:22:45 +05:30
parent 826446bd82
commit 265a7a8ee5
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -98,13 +98,14 @@ def _real_extract(self, url):
format_id = media.get('quality')
formats.append({
'url': format_url,
'ext': 'mp4',
'format_id': format_id,
'height': int_or_none(format_id),
})
if not formats:
video_url = self._html_search_regex(
r'<source src="(.+?)" type="video/mp4">', webpage, 'video URL')
formats.append({'url': video_url})
formats.append({'url': video_url, 'ext': 'mp4'})
self._sort_formats(formats)
thumbnail = self._og_search_thumbnail(webpage)