From f93b21c2c31069ef11394cb696905ddd6ae43aa7 Mon Sep 17 00:00:00 2001 From: Stefano Date: Thu, 25 Jul 2013 21:01:35 +0200 Subject: Fixed some pylint violations (cherry picked from commit cfbdcc19337314c0bc8901711ec0e63147e1c3d0) --- pyload/plugins/hoster/XFileSharingPro.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pyload/plugins/hoster/XFileSharingPro.py') diff --git a/pyload/plugins/hoster/XFileSharingPro.py b/pyload/plugins/hoster/XFileSharingPro.py index 8885ba9ca..9df843678 100644 --- a/pyload/plugins/hoster/XFileSharingPro.py +++ b/pyload/plugins/hoster/XFileSharingPro.py @@ -112,7 +112,7 @@ class XFileSharingPro(SimpleHoster): self.req.http.c.setopt(FOLLOWLOCATION, 1) location = None - found = re.search("Location\s*:\s*(.*)", self.header, re.I) + found = re.search(r"Location\s*:\s*(.*)", self.header, re.I) if found and re.match(self.DIRECT_LINK_PATTERN, found.group(1)): location = found.group(1).strip() @@ -133,7 +133,7 @@ class XFileSharingPro(SimpleHoster): self.header = self.req.http.header self.req.http.c.setopt(FOLLOWLOCATION, 1) - found = re.search("Location\s*:\s*(.*)", self.header, re.I) + found = re.search(r"Location\s*:\s*(.*)", self.header, re.I) if found: break @@ -208,7 +208,7 @@ class XFileSharingPro(SimpleHoster): if 'wait' in self.errmsg: wait_time = sum([int(v) * {"hour": 3600, "minute": 60, "second": 1}[u] for v, u in - re.findall('(\d+)\s*(hour|minute|second)?', self.errmsg)]) + re.findall(r'(\d+)\s*(hour|minute|second)?', self.errmsg)]) self.setWait(wait_time, True) self.wait() elif 'captcha' in self.errmsg: @@ -234,7 +234,7 @@ class XFileSharingPro(SimpleHoster): return self.errmsg def getPostParameters(self): - for i in range(3): + for _ in range(3): if not self.errmsg: self.checkErrors() @@ -313,7 +313,7 @@ class XFileSharingPro(SimpleHoster): if found: captcha_div = found.group(1) self.logDebug(captcha_div) - numerals = re.findall('(\d)', html_unescape(captcha_div)) + numerals = re.findall(r'(\d)', html_unescape(captcha_div)) inputs['code'] = "".join([a[1] for a in sorted(numerals, key=lambda num: int(num[0]))]) self.logDebug("CAPTCHA", inputs['code'], numerals) return 3 -- cgit v1.2.3