From 1c4bf83881d2a22da3773666a580d51f6b57bfd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 03:07:21 +0200 Subject: Avoid gettext conflict due variable `_` --- module/plugins/accounts/BayfilesCom.py | 2 +- module/plugins/accounts/FilecloudIo.py | 2 +- module/plugins/crypter/LixIn.py | 2 +- module/plugins/crypter/SafelinkingNet.py | 2 +- module/plugins/hooks/Captcha9kw.py | 2 +- module/plugins/hooks/CaptchaBrotherhood.py | 2 +- module/plugins/hooks/DeathByCaptcha.py | 2 +- module/plugins/hoster/BasePlugin.py | 2 +- module/plugins/hoster/BezvadataCz.py | 2 +- module/plugins/hoster/CrockoCom.py | 4 ++-- module/plugins/hoster/CzshareCom.py | 2 +- module/plugins/hoster/DataportCz.py | 2 +- module/plugins/hoster/DateiTo.py | 2 +- module/plugins/hoster/DepositfilesCom.py | 2 +- module/plugins/hoster/ExtabitCom.py | 2 +- module/plugins/hoster/FilecloudIo.py | 2 +- module/plugins/hoster/FilerNet.py | 2 +- module/plugins/hoster/FileserveCom.py | 2 +- module/plugins/hoster/GigapetaCom.py | 2 +- module/plugins/hoster/IfileIt.py | 2 +- module/plugins/hoster/IfolderRu.py | 2 +- module/plugins/hoster/Keep2shareCC.py | 2 +- module/plugins/hoster/LuckyShareNet.py | 2 +- module/plugins/hoster/MediafireCom.py | 2 +- module/plugins/hoster/MegasharesCom.py | 2 +- module/plugins/hoster/NarodRu.py | 2 +- module/plugins/hoster/OboomCom.py | 2 +- module/plugins/hoster/RapidgatorNet.py | 2 +- module/plugins/hoster/RyushareCom.py | 2 +- module/plugins/hoster/SendspaceCom.py | 2 +- module/plugins/hoster/ShareonlineBiz.py | 2 +- module/plugins/hoster/TurbobitNet.py | 4 ++-- module/plugins/hoster/UnibytesCom.py | 2 +- module/plugins/hoster/UnrestrictLi.py | 2 +- module/plugins/hoster/UploadedTo.py | 4 ++-- module/plugins/hoster/UploadheroCom.py | 2 +- module/plugins/hoster/Xdcc.py | 2 +- module/plugins/internal/XFSPHoster.py | 2 +- 38 files changed, 41 insertions(+), 41 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/accounts/BayfilesCom.py b/module/plugins/accounts/BayfilesCom.py index 2b6d45a18..d1cf8ba22 100644 --- a/module/plugins/accounts/BayfilesCom.py +++ b/module/plugins/accounts/BayfilesCom.py @@ -17,7 +17,7 @@ class BayfilesCom(Account): def loadAccountInfo(self, user, req): - for _ in xrange(2): + for _i in xrange(2): response = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) self.logDebug(response) if not response['error']: diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 439491ea9..e1f8c0142 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -17,7 +17,7 @@ class FilecloudIo(Account): def loadAccountInfo(self, user, req): # It looks like the first API request always fails, so we retry 5 times, it should work on the second try - for _ in xrange(5): + for _i in xrange(5): rep = req.load("https://secure.filecloud.io/api-fetch_apikey.api", post={"username": user, "password": self.accounts[user]['password']}) rep = json_loads(rep) diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 744066d19..0c20f6499 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -40,7 +40,7 @@ class LixIn(Crypter): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: - for _ in xrange(5): + for _i in xrange(5): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: self.logDebug("Trying captcha") diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index fcc48ca22..d9b511cf5 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -46,7 +46,7 @@ class SafelinkingNet(Crypter): postData['link-password'] = self.getPassword() if "altcaptcha" in self.html: - for _ in xrange(5): + for _i in xrange(5): m = re.search(self.SOLVEMEDIA_PATTERN, self.html) if m: captchaKey = m.group(1) diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py index 947aff121..930293002 100755 --- a/module/plugins/hooks/Captcha9kw.py +++ b/module/plugins/hooks/Captcha9kw.py @@ -84,7 +84,7 @@ class Captcha9kw(Hook): if response.isdigit(): self.logInfo(_("New CaptchaID from upload: %s : %s") % (response, task.captchaFile)) - for _ in xrange(1, 100, 1): + for _i in xrange(1, 100, 1): response2 = getURL(self.API_URL, get={"apikey": self.getConfig("passkey"), "id": response, "pyload": "1", "source": "pyload", "action": "usercaptchacorrectdata"}) diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py index da8fcbafe..a04b8616d 100644 --- a/module/plugins/hooks/CaptchaBrotherhood.py +++ b/module/plugins/hooks/CaptchaBrotherhood.py @@ -113,7 +113,7 @@ class CaptchaBrotherhood(Hook): ticket = response[3:] - for _ in xrange(15): + for _i in xrange(15): sleep(5) response = self.get_api("askCaptchaResult", ticket) if response.startswith("OK-answered"): diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index 99d7f7401..f390954e1 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -148,7 +148,7 @@ class DeathByCaptcha(Hook): raise DeathByCaptchaException(response) ticket = response['captcha'] - for _ in xrange(24): + for _i in xrange(24): sleep(5) response = self.call_api("captcha/%d" % ticket, False) if response['text'] and response['is_correct']: diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index ffc1a66af..573134cb9 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -80,7 +80,7 @@ class BasePlugin(Hoster): def downloadFile(self, pyfile): url = pyfile.url - for _ in xrange(5): + for _i in xrange(5): header = self.load(url, just_header=True) # self.load does not raise a BadHeader on 404 responses, do it here diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 426b4f494..aa5e1faee 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -36,7 +36,7 @@ class BezvadataCz(SimpleHoster): #captcha form self.html = self.load(url) self.checkErrors() - for _ in xrange(5): + for _i in xrange(5): action, inputs = self.parseHtmlForm('frm-stahnoutFreeForm') if not inputs: self.error("FreeForm") diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index ae1825c9f..95e00f679 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -34,7 +34,7 @@ class CrockoCom(SimpleHoster): if "You need Premium membership to download this file." in self.html: self.fail("You need Premium membership to download this file.") - for _ in xrange(5): + for _i in xrange(5): m = re.search(self.CAPTCHA_PATTERN, self.html) if m: url, wait_time = 'http://crocko.com' + m.group(1), m.group(2) @@ -51,7 +51,7 @@ class CrockoCom(SimpleHoster): inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) recaptcha = ReCaptcha(self) - for _ in xrange(5): + for _i in xrange(5): inputs['recaptcha_challenge_field'], inputs['recaptcha_response_field'] = recaptcha.challenge() self.download(action, post=inputs) diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 5c31958d7..cb450425b 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -100,7 +100,7 @@ class CzshareCom(SimpleHoster): # get and decrypt captcha captcha_url = 'http://sdilej.cz/captcha.php' - for _ in xrange(5): + for _i in xrange(5): inputs['captchastring2'] = self.decryptCaptcha(captcha_url) self.html = self.load(parsed_url, cookies=True, post=inputs, decode=True) if u"
  • Zadaný ověřovací kód nesouhlasí!
  • " in self.html: diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py index e4dfb0ad1..d57d86e2f 100644 --- a/module/plugins/hoster/DataportCz.py +++ b/module/plugins/hoster/DataportCz.py @@ -28,7 +28,7 @@ class DataportCz(SimpleHoster): def handleFree(self): captchas = {"1": "jkeG", "2": "hMJQ", "3": "vmEK", "4": "ePQM", "5": "blBd"} - for _ in xrange(60): + for _i in xrange(60): action, inputs = self.parseHtmlForm('free_download_form') self.logDebug(action, inputs) if not action or not inputs: diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index 5440927e1..73e48d129 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -32,7 +32,7 @@ class DateiTo(SimpleHoster): data = {'P': 'I', 'ID': self.file_info['ID']} recaptcha = ReCaptcha(self) - for _ in xrange(10): + for _i in xrange(10): self.logDebug("URL", url, "POST", data) self.html = self.load(url, post=data) self.checkErrors() diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 3dd2d0ff2..66c81de29 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -74,7 +74,7 @@ class DepositfilesCom(SimpleHoster): if captcha_key is None: self.error("ReCaptcha key not found") - for _ in xrange(5): + for _i in xrange(5): self.html = self.load("https://dfiles.eu/get_file.php", get=params) if '