]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[mva] Improve _VALID_URLs
authorSergey M․ <dstftw@gmail.com>
Sun, 8 May 2016 14:10:20 +0000 (20:10 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 8 May 2016 14:10:20 +0000 (20:10 +0600)
youtube_dl/extractor/microsoftvirtualacademy.py

index b7fea47ee948ac092c7b7c5250aeda765b6bb977..afd3e98ecbf1cd4d2016550bf715bd0a4b3fe167 100644 (file)
@@ -31,7 +31,7 @@ class MicrosoftVirtualAcademyBaseIE(InfoExtractor):
 class MicrosoftVirtualAcademyIE(MicrosoftVirtualAcademyBaseIE):
     IE_NAME = 'mva'
     IE_DESC = 'Microsoft Virtual Academy videos'
-    _VALID_URL = r'(?:%s:|https?://(?:mva\.microsoft|microsoftvirtualacademy)\.com/[^/]+/training-courses/[^/?#&]+-)(?P<course_id>\d+)(?::|\?l=)(?P<id>[\da-zA-Z]+_\d+)' % IE_NAME
+    _VALID_URL = r'(?:%s:|https?://(?:mva\.microsoft|(?:www\.)?microsoftvirtualacademy)\.com/[^/]+/training-courses/[^/?#&]+-)(?P<course_id>\d+)(?::|\?l=)(?P<id>[\da-zA-Z]+_\d+)' % IE_NAME
 
     _TESTS = [{
         'url': 'https://mva.microsoft.com/en-US/training-courses/microsoft-azure-fundamentals-virtual-machines-11788?l=gfVXISmEB_6804984382',
@@ -118,7 +118,7 @@ class MicrosoftVirtualAcademyIE(MicrosoftVirtualAcademyBaseIE):
 class MicrosoftVirtualAcademyCourseIE(MicrosoftVirtualAcademyBaseIE):
     IE_NAME = 'mva:course'
     IE_DESC = 'Microsoft Virtual Academy courses'
-    _VALID_URL = r'(?:%s:|https?://(?:mva\.microsoft|microsoftvirtualacademy)\.com/[^/]+/training-courses/(?P<display_id>[^/?#&]+)-)(?P<id>\d+)' % IE_NAME
+    _VALID_URL = r'(?:%s:|https?://(?:mva\.microsoft|(?:www\.)?microsoftvirtualacademy)\.com/[^/]+/training-courses/(?P<display_id>[^/?#&]+)-)(?P<id>\d+)' % IE_NAME
 
     _TESTS = [{
         'url': 'https://mva.microsoft.com/en-US/training-courses/microsoft-azure-fundamentals-virtual-machines-11788',