[viidea] fix _VALID_URL regex and tests
authorremitamine <remitamine@gmail.com>
Sat, 7 Nov 2015 16:43:23 +0000 (17:43 +0100)
committerSergey M․ <dstftw@gmail.com>
Sun, 8 Nov 2015 00:55:51 +0000 (06:55 +0600)
youtube_dl/extractor/viidea.py

index 71fb298e65e78182c8c64528ec85bbeff4aede11..ae9a427376bb6b4b747c0757ea7477089daee060 100644 (file)
@@ -31,7 +31,7 @@ class ViideaIE(InfoExtractor):
             bvvideo\.si|
             kongres\.viidea\.net|
             edemokracija\.viidea\.com
-        )(?:/lecture)?/(?P<id>[^/]+)(?:/video/(?P<part>\d+))?'''
+        )(?:/lecture)?/(?P<id>[^/]+)(?:/video/(?P<part>\d+))?/*(?:[#?].*)?$'''
 
     _TESTS = [{
         'url': 'http://videolectures.net/promogram_igor_mekjavic_eng/',
@@ -130,7 +130,7 @@ class ViideaIE(InfoExtractor):
                 return info
             else:
                 for part in parts:
-                    entries.append(self.url_result('%s/video/%s' % (base_url, lecture_id, part), 'Viidea'))
+                    entries.append(self.url_result('%s/%s/video/%s' % (base_url, lecture_slug, part), 'Viidea'))
                 lecture_info['_type'] = 'multi_video'
         else:
             # Probably a playlist