]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[teamcoco] Fix regex in 2.6 (#2700)
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 4 Apr 2014 20:46:44 +0000 (22:46 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Fri, 4 Apr 2014 20:46:47 +0000 (22:46 +0200)
The re engine does not want to repeat an empty string, for fear that something like

    (.*)*

could be matching the tokens ...

    ""
    "" ""
    "" "" ""

Of course, that's harmless with a question mark, although still somewhat strange.

youtube_dl/extractor/teamcoco.py

index fdaf62cd0fe943ba962af0b02332a4ff9c63d4e2..c86f1e423a054db47906e9920174680bea435c46 100644 (file)
@@ -9,7 +9,7 @@ from ..utils import (
 
 
 class TeamcocoIE(InfoExtractor):
-    _VALID_URL = r'http://teamcoco\.com/video/(?P<video_id>\d*)?/?(?P<url_title>.*)'
+    _VALID_URL = r'http://teamcoco\.com/video/(?P<video_id>[0-9]+)?/?(?P<url_title>.*)'
     _TESTS = [
     {
         'url': 'http://teamcoco.com/video/80187/conan-becomes-a-mary-kay-beauty-consultant',