Browse Source

[teachertube] Fix extraction for Python 3

totalwebcasting
Sergey M․ 11 years ago
parent
commit
702e522044
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      youtube_dl/extractor/teachertube.py

+ 3
- 1
youtube_dl/extractor/teachertube.py View File

@ -55,11 +55,13 @@ class TeacherTubeIE(InfoExtractor):
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)


Loading…
Cancel
Save