projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
814d425
)
[teachertube] Fix extraction for Python 3
author
Sergey M․
<dstftw@gmail.com>
Sun, 8 Jun 2014 15:16:48 +0000
(22:16 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 8 Jun 2014 15:16:48 +0000
(22:16 +0700)
youtube_dl/extractor/teachertube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/teachertube.py
b/youtube_dl/extractor/teachertube.py
index 6d52763f95b26b9e2273a62f7a777841a3f9882f..4d9666c6b14980d6b04ebe1bd07cc3e79a9dd2bd 100644
(file)
--- 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)