From 9395182da7afed55a29bde1c7cbefe4204e783f0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:02:09 +0200 Subject: Store all re.search/match object as "m" instead "found" --- module/plugins/hoster/StreamcloudEu.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/StreamcloudEu.py') diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py index a9b2804e4..3cbf015c9 100644 --- a/module/plugins/hoster/StreamcloudEu.py +++ b/module/plugins/hoster/StreamcloudEu.py @@ -25,9 +25,9 @@ class StreamcloudEu(XFileSharingPro): self.multiDL = True def getDownloadLink(self): - found = re.search(self.LINK_PATTERN, self.html, re.S) - if found: - return found.group(1) + m = re.search(self.LINK_PATTERN, self.html, re.S) + if m: + return m.group(1) for i in xrange(5): self.logDebug("Getting download link: #%d" % i) @@ -38,12 +38,12 @@ class StreamcloudEu(XFileSharingPro): self.html = httpRequest.load(self.pyfile.url, post=data, referer=False, cookies=True, decode=True) self.header = httpRequest.header - found = re.search("Location\s*:\s*(.*)", self.header, re.I) - if found: + m = re.search("Location\s*:\s*(.*)", self.header, re.I) + if m: break - found = re.search(self.LINK_PATTERN, self.html, re.S) - if found: + m = re.search(self.LINK_PATTERN, self.html, re.S) + if m: break else: @@ -52,7 +52,7 @@ class StreamcloudEu(XFileSharingPro): else: self.fail("Download link not found") - return found.group(1) + return m.group(1) def getPostParameters(self): for i in xrange(3): @@ -82,9 +82,9 @@ class StreamcloudEu(XFileSharingPro): self.fail("No or invalid passport") if not self.premium: - found = re.search(self.WAIT_PATTERN, self.html) - if found: - wait_time = int(found.group(1)) + 1 + m = re.search(self.WAIT_PATTERN, self.html) + if m: + wait_time = int(m.group(1)) + 1 self.setWait(wait_time, False) else: wait_time = 0 -- cgit v1.2.3