From: Philipp Hagemeister Date: Thu, 21 Aug 2014 11:37:19 +0000 (+0200) Subject: [metacafe] Avoid excessive nesting X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=c15235cd073c3dd7d796e36c69cc5ec67f97ffe7;p=youtube-dl [metacafe] Avoid excessive nesting --- diff --git a/youtube_dl/extractor/metacafe.py b/youtube_dl/extractor/metacafe.py index c3a4a333c..96a4f1018 100644 --- a/youtube_dl/extractor/metacafe.py +++ b/youtube_dl/extractor/metacafe.py @@ -134,6 +134,7 @@ class MetacafeIE(InfoExtractor): # Extract URL, uploader and title from webpage self.report_extraction(video_id) + video_url = None mobj = re.search(r'(?m)&mediaURL=([^&]+)', webpage) if mobj is not None: mediaURL = compat_urllib_parse.unquote(mobj.group(1)) @@ -146,14 +147,16 @@ class MetacafeIE(InfoExtractor): else: gdaKey = mobj.group(1) video_url = '%s?__gda__=%s' % (mediaURL, gdaKey) - else: + if video_url is None: mobj = re.search(r'