diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:02:09 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:34:54 +0200 |
commit | 9395182da7afed55a29bde1c7cbefe4204e783f0 (patch) | |
tree | 14c5f5f2dc5ea428c4625e8ce9208c5d77d1fc18 /module/plugins/hoster/NarodRu.py | |
parent | [account] self.html -> html (where was possible) (diff) | |
download | pyload-9395182da7afed55a29bde1c7cbefe4204e783f0.tar.xz |
Store all re.search/match object as "m" instead "found"
Diffstat (limited to 'module/plugins/hoster/NarodRu.py')
-rw-r--r-- | module/plugins/hoster/NarodRu.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index d2f5e5856..396e207a0 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -43,17 +43,17 @@ class NarodRu(SimpleHoster): def handleFree(self): for _ in xrange(5): self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random() * 777)) - found = re.search(self.CAPTCHA_PATTERN, self.html) - if found is None: + m = re.search(self.CAPTCHA_PATTERN, self.html) + if m is None: self.parseError('Captcha') post_data = {"action": "sendcapcha"} - captcha_url, post_data['key'] = found.groups() + captcha_url, post_data['key'] = m.groups() post_data['rep'] = self.decryptCaptcha(captcha_url) self.html = self.load(self.pyfile.url, post=post_data, decode=True) - found = re.search(self.LINK_PATTERN, self.html) - if found: - url = 'http://narod.ru' + found.group(1) + m = re.search(self.LINK_PATTERN, self.html) + if m: + url = 'http://narod.ru' + m.group(1) self.correctCaptcha() break elif u'<b class="error-msg"><strong>Ошиблись?</strong>' in self.html: |