]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[tudou] A more comprehensive _VALID_URL
authorYen Chi Hsuan <yan12125@gmail.com>
Sat, 12 Sep 2015 14:45:09 +0000 (22:45 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sat, 12 Sep 2015 14:45:09 +0000 (22:45 +0800)
youtube_dl/extractor/tudou.py

index 950c42afb4931fb3ff779ea2b91177922b1d76c0..68712cb4adec484df73d53a21b2ad397335371bd 100644 (file)
@@ -9,7 +9,7 @@ from .common import InfoExtractor
 
 
 class TudouIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?tudou\.com/(?:listplay|programs(?:/view)?|albumplay)/?.*/(?P<id>[^/?#]+?)(?:\.html)?/?(?:$|[?#])'
+    _VALID_URL = r'https?://(?:www\.)?tudou\.com/(?:listplay|programs(?:/view)?|albumplay)/([^/]+/)*(?P<id>[^/?#]+?)(?:\.html)?/?(?:$|[?#])'
     _TESTS = [{
         'url': 'http://www.tudou.com/listplay/zzdE77v6Mmo/2xN2duXMxmw.html',
         'md5': '140a49ed444bd22f93330985d8475fcb',