Explorar o código

[tudou] A more comprehensive _VALID_URL

Yen Chi Hsuan %!s(int64=10) %!d(string=hai) anos
pai
achega
94e507aea7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/extractor/tudou.py

+ 1 - 1
youtube_dl/extractor/tudou.py

@@ -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',