Explorar o código

[teamcoco] Fix regex in 2.6 (#2700)

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.
Philipp Hagemeister %!s(int64=11) %!d(string=hai) anos
pai
achega
c465afd736
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      youtube_dl/extractor/teamcoco.py

+ 1 - 1
youtube_dl/extractor/teamcoco.py

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