mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[teachertube] Improve extraction
This commit is contained in:
parent
d410fee91d
commit
c7df67edbd
1 changed files with 2 additions and 1 deletions
|
@ -66,6 +66,7 @@ def _real_extract(self, url):
|
|||
|
||||
media_urls = re.findall(r'data-contenturl="([^"]+)"', webpage)
|
||||
media_urls.extend(re.findall(r'var\s+filePath\s*=\s*"([^"]+)"', webpage))
|
||||
media_urls.extend(re.findall(r'\'file\'\s*:\s*["\']([^"\']+)["\'],', webpage))
|
||||
|
||||
formats = [
|
||||
{
|
||||
|
@ -79,7 +80,7 @@ def _real_extract(self, url):
|
|||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
'thumbnail': self._html_search_regex(r'var\s+thumbUrl\s*=\s*"([^"]+)"', webpage, 'thumbnail'),
|
||||
'thumbnail': self._html_search_regex(r'\'image\'\s*:\s*["\']([^"\']+)["\']', webpage, 'thumbnail'),
|
||||
'formats': formats,
|
||||
'description': description,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue