From: codesparkle Date: Fri, 30 Jan 2015 07:41:40 +0000 (+1100) Subject: The opening curly brace `{` is a regex reserved [control character](http://stackoverf... X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=52585fd6dcd5020f2800d133588d7232419dddc0;p=youtube-dl The opening curly brace `{` is a regex reserved [control character](stackoverflow.com/a/400316/1106367), so it needs to be escaped. --- diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 41884ed7a..a6f102a4e 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1073,7 +1073,7 @@ class GenericIE(InfoExtractor): found = filter_video(re.findall(r'''(?xs) flowplayer\("[^"]+",\s* \{[^}]+?\}\s*, - \s*{[^}]+? ["']?clip["']?\s*:\s*\{\s* + \s*\{[^}]+? ["']?clip["']?\s*:\s*\{\s* ["']?url["']?\s*:\s*["']([^"']+)["'] ''', webpage)) if not found: diff --git a/youtube_dl/extractor/grooveshark.py b/youtube_dl/extractor/grooveshark.py index fff74a70a..848d17beb 100644 --- a/youtube_dl/extractor/grooveshark.py +++ b/youtube_dl/extractor/grooveshark.py @@ -83,7 +83,7 @@ class GroovesharkIE(InfoExtractor): return compat_urlparse.urlunparse((uri.scheme, uri.netloc, obj['attrs']['data'], None, None, None)) def _transform_bootstrap(self, js): - return re.split('(?m)^\s*try\s*{', js)[0] \ + return re.split('(?m)^\s*try\s*\{', js)[0] \ .split(' = ', 1)[1].strip().rstrip(';') def _transform_meta(self, js):