[teachertube] Add support for new video URL format
authorSergey M․ <dstftw@gmail.com>
Thu, 3 Jul 2014 14:11:56 +0000 (21:11 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 3 Jul 2014 14:11:56 +0000 (21:11 +0700)
youtube_dl/extractor/teachertube.py

index 7167a036e7a5649e1e886af80185a2bb2973e60c..2c2113b1404fb3631126636bdb38ba839008a404 100644 (file)
@@ -14,7 +14,7 @@ class TeacherTubeIE(InfoExtractor):
     IE_NAME = 'teachertube'
     IE_DESC = 'teachertube.com videos'
 
-    _VALID_URL = r'https?://(?:www\.)?teachertube\.com/(viewVideo\.php\?video_id=|music\.php\?music_id=|video/|audio/)(?P<id>\d+)'
+    _VALID_URL = r'https?://(?:www\.)?teachertube\.com/(viewVideo\.php\?video_id=|music\.php\?music_id=|video/(?:[\da-z-]+-)?|audio/)(?P<id>\d+)'
 
     _TESTS = [{
         'url': 'http://www.teachertube.com/viewVideo.php?video_id=339997',
@@ -45,6 +45,15 @@ class TeacherTubeIE(InfoExtractor):
             'title': 'PER ASPERA AD ASTRA',
             'description': 'RADIJSKA EMISIJA ZRAKOPLOVNE TEHNI?KE ?KOLE P',
         },
+    }, {
+        'url': 'http://www.teachertube.com/video/intro-video-schleicher-297790',
+        'md5': '9c79fbb2dd7154823996fc28d4a26998',
+        'info_dict': {
+            'id': '297790',
+            'ext': 'mp4',
+            'title': 'Intro Video - Schleicher',
+            'description': 'Intro Video - Why to flip, how flipping will',
+        },
     }]
 
     def _real_extract(self, url):