[teachertube] Improve extraction
[youtube-dl] / youtube_dl / extractor / teachertube.py
index b3cb6bd76db9b691135a9a32e2d9ab5cda1f8655..c9a3fe571a5fa41e2bd62c07922166cc1bc90845 100644 (file)
@@ -66,6 +66,7 @@ class TeacherTubeIE(InfoExtractor):
 
         media_urls = re.findall(r'data-contenturl="([^"]+)"', webpage)
         media_urls.extend(re.findall(r'var\s+filePath\s*=\s*"([^"]+)"', webpage))
+        media_urls.extend(re.findall(r'\'file\'\s*:\s*["\']([^"\']+)["\'],', webpage))
 
         formats = [
             {
@@ -79,7 +80,7 @@ class TeacherTubeIE(InfoExtractor):
         return {
             'id': video_id,
             'title': title,
-            'thumbnail': self._html_search_regex(r'var\s+thumbUrl\s*=\s*"([^"]+)"', webpage, 'thumbnail'),
+            'thumbnail': self._html_search_regex(r'\'image\'\s*:\s*["\']([^"\']+)["\']', webpage, 'thumbnail'),
             'formats': formats,
             'description': description,
         }