[khanacademy] Improve _VALID_URL (Closes #3695)
authorSergey M․ <dstftw@gmail.com>
Tue, 9 Sep 2014 15:09:32 +0000 (22:09 +0700)
committerSergey M․ <dstftw@gmail.com>
Tue, 9 Sep 2014 15:09:32 +0000 (22:09 +0700)
youtube_dl/extractor/khanacademy.py

index 04bac7517134d3c7f78f4ee467506bc38374593b..408d00944ceb83e1551c12b5707031c961bb4f5d 100644 (file)
@@ -9,7 +9,7 @@ from ..utils import (
 
 
 class KhanAcademyIE(InfoExtractor):
-    _VALID_URL = r'^https?://(?:www\.)?khanacademy\.org/(?P<key>[^/]+)/(?:[^/]+/){,2}(?P<id>[^?#/]+)(?:$|[?#])'
+    _VALID_URL = r'^https?://(?:(?:www|api)\.)?khanacademy\.org/(?P<key>[^/]+)/(?:[^/]+/){,2}(?P<id>[^?#/]+)(?:$|[?#])'
     IE_NAME = 'KhanAcademy'
 
     _TESTS = [{