mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-22 22:47:55 +01:00
[teachertube] Fix extraction for Python 3
This commit is contained in:
parent
814d4257df
commit
702e522044
@ -55,11 +55,13 @@ class TeacherTubeIE(InfoExtractor):
|
|||||||
|
|
||||||
quality = qualities(['mp3', 'flv', 'mp4'])
|
quality = qualities(['mp3', 'flv', 'mp4'])
|
||||||
|
|
||||||
|
_, media_urls = zip(*re.findall(r'([\'"])file\1\s*:\s*"([^"]+)"', webpage))
|
||||||
|
|
||||||
formats = [
|
formats = [
|
||||||
{
|
{
|
||||||
'url': media_url,
|
'url': media_url,
|
||||||
'quality': quality(determine_ext(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)
|
self._sort_formats(formats)
|
||||||
|
Loading…
Reference in New Issue
Block a user