0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[teachertube] Fix extraction for Python 3

This commit is contained in:
Sergey M․ 2014-06-08 22:16:48 +07:00
parent 814d4257df
commit 702e522044

View file

@ -55,11 +55,13 @@ def _real_extract(self, url):
quality = qualities(['mp3', 'flv', 'mp4'])
_, media_urls = zip(*re.findall(r'([\'"])file\1\s*:\s*"([^"]+)"', webpage))
formats = [
{
'url': media_url,
'quality': quality(determine_ext(media_url))
} for media_url in set(zip(*re.findall(r'([\'"])file\1\s*:\s*"([^"]+)"', webpage))[1])
} for media_url in set(media_urls)
]
self._sort_formats(formats)