[youtube] signatures: Recognize javascript functions that contain “$” (fixes #2304)
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 4 Feb 2014 20:38:50 +0000 (21:38 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Tue, 4 Feb 2014 20:38:50 +0000 (21:38 +0100)
youtube_dl/extractor/youtube.py

index 54592d174b1b27cbeb55bae783b9549e0ab37dd3..5dd2de5ee4856c3cc1c08324e2bed2cba4957cc9 100644 (file)
@@ -502,7 +502,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
                 return a % b
 
             m = re.match(
-                r'^(?P<func>[a-zA-Z]+)\((?P<args>[a-z0-9,]+)\)$', expr)
+                r'^(?P<func>[a-zA-Z$]+)\((?P<args>[a-z0-9,]+)\)$', expr)
             if m:
                 fname = m.group('func')
                 if fname not in functions: