aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/teachertube.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2014-06-08 22:16:48 +0700
committerSergey M․ <dstftw@gmail.com>2014-06-08 22:16:48 +0700
commit702e5220444a970cd4d05ec95deb478391e365cc (patch)
treeb33396b789f6e1b7b9cffa2a6c8212c17a6aaba6 /youtube_dl/extractor/teachertube.py
parent814d4257dfe75b591dee2120c57cb44ebb547dff (diff)
[teachertube] Fix extraction for Python 3
Diffstat (limited to 'youtube_dl/extractor/teachertube.py')
-rw-r--r--youtube_dl/extractor/teachertube.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/teachertube.py b/youtube_dl/extractor/teachertube.py
index 6d52763f9..4d9666c6b 100644
--- a/youtube_dl/extractor/teachertube.py
+++ b/youtube_dl/extractor/teachertube.py
@@ -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)