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/BayfilesCom.py | 24 ++++++------ module/plugins/hoster/BezvadataCz.py | 22 +++++------ module/plugins/hoster/CatShareNet.py | 4 +- module/plugins/hoster/CrockoCom.py | 18 ++++----- module/plugins/hoster/CzshareCom.py | 26 ++++++------- module/plugins/hoster/DateiTo.py | 24 ++++++------ module/plugins/hoster/DepositfilesCom.py | 18 ++++----- module/plugins/hoster/DlFreeFr.py | 24 ++++++------ module/plugins/hoster/EdiskCz.py | 6 +-- module/plugins/hoster/EuroshareEu.py | 6 +-- module/plugins/hoster/FastshareCz.py | 12 +++--- module/plugins/hoster/File4safeCom.py | 6 +-- module/plugins/hoster/FilecloudIo.py | 16 ++++---- module/plugins/hoster/FilefactoryCom.py | 6 +-- module/plugins/hoster/FilepostCom.py | 12 +++--- module/plugins/hoster/FileserveCom.py | 6 +-- module/plugins/hoster/FourSharedCom.py | 16 ++++---- module/plugins/hoster/FshareVn.py | 20 +++++----- module/plugins/hoster/Ftp.py | 6 +-- module/plugins/hoster/GigapetaCom.py | 6 +-- module/plugins/hoster/HellshareCz.py | 6 +-- module/plugins/hoster/LetitbitNet.py | 12 +++--- module/plugins/hoster/LoadTo.py | 6 +-- module/plugins/hoster/MediafireCom.py | 12 +++--- module/plugins/hoster/MegasharesCom.py | 26 ++++++------- module/plugins/hoster/NarodRu.py | 12 +++--- module/plugins/hoster/NowDownloadEu.py | 6 +-- module/plugins/hoster/OneFichierCom.py | 4 +- module/plugins/hoster/PornhubCom.py | 6 +-- module/plugins/hoster/QuickshareCz.py | 18 ++++----- module/plugins/hoster/RapidgatorNet.py | 40 ++++++++++---------- module/plugins/hoster/RgHostNet.py | 6 +-- module/plugins/hoster/RyushareCom.py | 12 +++--- module/plugins/hoster/SendspaceCom.py | 18 ++++----- module/plugins/hoster/ShareRapidCom.py | 6 +-- module/plugins/hoster/ShareonlineBiz.py | 14 +++---- module/plugins/hoster/SoundcloudCom.py | 18 ++++----- module/plugins/hoster/StreamCz.py | 12 +++--- module/plugins/hoster/StreamcloudEu.py | 22 +++++------ module/plugins/hoster/TurbobitNet.py | 26 ++++++------- module/plugins/hoster/TwoSharedCom.py | 6 +-- module/plugins/hoster/UlozTo.py | 12 +++--- module/plugins/hoster/UloziskoSk.py | 24 ++++++------ module/plugins/hoster/UnibytesCom.py | 16 ++++---- module/plugins/hoster/UploadedTo.py | 29 +++++++++------ module/plugins/hoster/UploadheroCom.py | 22 +++++------ module/plugins/hoster/UploadingCom.py | 14 +++---- module/plugins/hoster/UptoboxCom.py | 24 ++++++------ module/plugins/hoster/VeehdCom.py | 12 +++--- module/plugins/hoster/VeohCom.py | 6 +-- module/plugins/hoster/XFileSharingPro.py | 64 ++++++++++++++++---------------- module/plugins/hoster/YibaishiwuCom.py | 12 +++--- 52 files changed, 403 insertions(+), 398 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py index 449bb890e..272c7cd88 100644 --- a/module/plugins/hoster/BayfilesCom.py +++ b/module/plugins/hoster/BayfilesCom.py @@ -40,16 +40,16 @@ class BayfilesCom(SimpleHoster): PREMIUM_LINK_PATTERN = r'(?:', self.html) - if found is None: + m = re.search(r'', self.html) + if m is None: self.parseError("page2 URL") - url = "http://bezvadata.cz%s" % found.group(1) + url = "http://bezvadata.cz%s" % m.group(1) self.logDebug("DL URL %s" % url) #countdown - found = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) - wait_time = (int(found.group(1)) * 60 + int(found.group(2)) + 1) if found else 120 + m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) + wait_time = (int(m.group(1)) * 60 + int(m.group(2)) + 1) if m else 120 self.wait(wait_time, False) self.download(url) diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 406b7bcd4..2cd85420d 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -23,8 +23,8 @@ class CatShareNet(SimpleHoster): def handleFree(self): - found = re.search(self.SECONDS_PATTERN, self.html) - seconds = int(found.group(1)) + m = re.search(self.SECONDS_PATTERN, self.html) + seconds = int(m.group(1)) self.logDebug("Seconds found", seconds) self.wait(seconds + 1) recaptcha = ReCaptcha(self) diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 489baaeb4..b36d59993 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -33,23 +33,23 @@ class CrockoCom(SimpleHoster): self.fail("You need Premium membership to download this file.") for _ in xrange(5): - found = re.search(self.CAPTCHA_URL_PATTERN, self.html) - if found: - url, wait_time = 'http://crocko.com' + found.group(1), found.group(2) + m = re.search(self.CAPTCHA_URL_PATTERN, self.html) + if m: + url, wait_time = 'http://crocko.com' + m.group(1), m.group(2) self.wait(wait_time) self.html = self.load(url) else: break - found = re.search(self.CAPTCHA_KEY_PATTERN, self.html) - if found is None: + m = re.search(self.CAPTCHA_KEY_PATTERN, self.html) + if m is None: self.parseError('Captcha KEY') - captcha_key = found.group(1) + captcha_key = m.group(1) - found = re.search(self.FORM_PATTERN, self.html, re.DOTALL) - if found is None: + m = re.search(self.FORM_PATTERN, self.html, re.DOTALL) + if m is None: self.parseError('ACTION') - action, form = found.groups() + action, form = m.groups() inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) recaptcha = ReCaptcha(self) diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index f66f1b5a2..c34e73ff4 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -51,17 +51,17 @@ class CzshareCom(SimpleHoster): def checkTrafficLeft(self): # check if user logged in - found = re.search(self.USER_CREDIT_PATTERN, self.html) - if found is None: + m = re.search(self.USER_CREDIT_PATTERN, self.html) + if m is None: self.account.relogin(self.user) self.html = self.load(self.pyfile.url, cookies=True, decode=True) - found = re.search(self.USER_CREDIT_PATTERN, self.html) - if found is None: + m = re.search(self.USER_CREDIT_PATTERN, self.html) + if m is None: return False # check user credit try: - credit = parseFileSize(found.group(1).replace(' ', ''), found.group(2)) + credit = parseFileSize(m.group(1).replace(' ', ''), m.group(2)) self.logInfo("Premium download for %i KiB of Credit" % (self.pyfile.size / 1024)) self.logInfo("User %s has %i KiB left" % (self.user, credit / 1024)) if credit < self.pyfile.size: @@ -88,10 +88,10 @@ class CzshareCom(SimpleHoster): def handleFree(self): # get free url - found = re.search(self.FREE_URL_PATTERN, self.html) - if found is None: + m = re.search(self.FREE_URL_PATTERN, self.html) + if m is None: self.parseError('Free URL') - parsed_url = "http://sdilej.cz" + found.group(1) + parsed_url = "http://sdilej.cz" + m.group(1) self.logDebug("PARSED_URL:" + parsed_url) # get download ticket and parse html @@ -122,16 +122,16 @@ class CzshareCom(SimpleHoster): else: self.fail("No valid captcha code entered") - found = re.search("countdown_number = (\d+);", self.html) - self.setWait(int(found.group(1)) if found else 50) + m = re.search("countdown_number = (\d+);", self.html) + self.setWait(int(m.group(1)) if m else 50) # download the file, destination is determined by pyLoad self.logDebug("WAIT URL", self.req.lastEffectiveURL) - found = re.search("free_wait.php\?server=(.*?)&(.*)", self.req.lastEffectiveURL) - if found is None: + m = re.search("free_wait.php\?server=(.*?)&(.*)", self.req.lastEffectiveURL) + if m is None: self.parseError('Download URL') - url = "http://%s/download.php?%s" % (found.group(1), found.group(2)) + url = "http://%s/download.php?%s" % (m.group(1), m.group(2)) self.wait() self.download(url) diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index 160e8aaf5..4d39b178e 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -56,15 +56,15 @@ class DateiTo(SimpleHoster): elif data['P'] == 'IV': break - found = re.search(self.DATA_PATTERN, self.html) - if found is None: + m = re.search(self.DATA_PATTERN, self.html) + if m is None: self.parseError('data') - url = 'http://datei.to/' + found.group(1) - data = dict(x.split('=') for x in found.group(2).split('&')) + url = 'http://datei.to/' + m.group(1) + data = dict(x.split('=') for x in m.group(2).split('&')) if url.endswith('recaptcha.php'): - found = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) - recaptcha_key = found.group(1) if found else "6LdBbL8SAAAAAI0vKUo58XRwDd5Tu_Ze1DA7qTao" + m = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) + recaptcha_key = m.group(1) if m else "6LdBbL8SAAAAAI0vKUo58XRwDd5Tu_Ze1DA7qTao" data['recaptcha_challenge_field'], data['recaptcha_response_field'] = recaptcha.challenge(recaptcha_key) @@ -76,16 +76,16 @@ class DateiTo(SimpleHoster): self.download(download_url) def checkErrors(self): - found = re.search(self.PARALELL_PATTERN, self.html) - if found: - found = re.search(self.WAIT_PATTERN, self.html) - wait_time = int(found.group(1)) if found else 30 + m = re.search(self.PARALELL_PATTERN, self.html) + if m: + m = re.search(self.WAIT_PATTERN, self.html) + wait_time = int(m.group(1)) if m else 30 self.wait(wait_time + 1, False) self.retry() def doWait(self): - found = re.search(self.WAIT_PATTERN, self.html) - wait_time = int(found.group(1)) if found else 30 + m = re.search(self.WAIT_PATTERN, self.html) + wait_time = int(m.group(1)) if m else 30 self.load('http://datei.to/ajax/download.php', post={'P': 'Ads'}) self.wait(wait_time + 1, False) diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 386e3694e..15e23cba7 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -59,16 +59,16 @@ class DepositfilesCom(SimpleHoster): if wait: self.setWait(int(wait.group(1))) - found = re.search(r"var fid = '(\w+)';", self.html) - if found is None: + m = re.search(r"var fid = '(\w+)';", self.html) + if m is None: self.retry(wait_time=5) - params = {'fid': found.group(1)} + params = {'fid': m.group(1)} self.logDebug("FID: %s" % params['fid']) captcha_key = '6LdRTL8SAAAAAE9UOdWZ4d0Ky-aeA7XfSqyWDM2m' - found = re.search(self.RECAPTCHA_PATTERN, self.html) - if found: - captcha_key = found.group(1) + m = re.search(self.RECAPTCHA_PATTERN, self.html) + if m: + captcha_key = m.group(1) self.logDebug("CAPTCHA_KEY: %s" % captcha_key) self.wait() @@ -86,11 +86,11 @@ class DepositfilesCom(SimpleHoster): self.logDebug(params) continue - found = re.search(self.FREE_LINK_PATTERN, self.html) - if found: + m = re.search(self.FREE_LINK_PATTERN, self.html) + if m: if 'response' in params: self.correctCaptcha() - link = unquote(found.group(1)) + link = unquote(m.group(1)) self.logDebug("LINK: %s" % link) break else: diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py index 7bebb62b5..5fb527136 100644 --- a/module/plugins/hoster/DlFreeFr.py +++ b/module/plugins/hoster/DlFreeFr.py @@ -46,9 +46,9 @@ class AdYouLike: def challenge(self, html): adyoulike_data_string = None - found = re.search(self.ADYOULIKE_INPUT_PATTERN, html) - if found: - adyoulike_data_string = found.group(1) + m = re.search(self.ADYOULIKE_INPUT_PATTERN, html) + if m: + adyoulike_data_string = m.group(1) else: self.plugin.fail("Can't read AdYouLike input data") @@ -61,10 +61,10 @@ class AdYouLike: "ayl_key": ayl_data[self.engine]['key'], "ayl_env": ayl_data['all']['env'], "callback": self.ADYOULIKE_CALLBACK}) - found = re.search(self.ADYOULIKE_CHALLENGE_PATTERN, res) + m = re.search(self.ADYOULIKE_CHALLENGE_PATTERN, res) challenge_string = None - if found: - challenge_string = found.group(1) + if m: + challenge_string = m.group(1) else: self.plugin.fail("Invalid AdYouLike challenge") challenge_data = json_loads(challenge_string) @@ -86,9 +86,9 @@ class AdYouLike: response = None try: instructions_visual = challenge['translations'][ayl['all']['lang']]['instructions_visual'] - found = re.search(u".*«(.*)».*", instructions_visual) - if found: - response = found.group(1).strip() + m = re.search(u".*«(.*)».*", instructions_visual) + if m: + response = m.group(1).strip() else: self.plugin.fail("Can't parse instructions visual") except KeyError: @@ -166,10 +166,10 @@ class DlFreeFr(SimpleHoster): self.load("http://dl.free.fr/getfile.pl", post=inputs) headers = self.getLastHeaders() if headers.get("code") == 302 and "set-cookie" in headers and "location" in headers: - found = re.search("(.*?)=(.*?); path=(.*?); domain=(.*?)", headers.get("set-cookie")) + m = re.search("(.*?)=(.*?); path=(.*?); domain=(.*?)", headers.get("set-cookie")) cj = CookieJar(__name__) - if found: - cj.setCookie(found.group(4), found.group(1), found.group(2), found.group(3)) + if m: + cj.setCookie(m.group(4), m.group(1), m.group(2), m.group(3)) else: self.fail("Cookie error") location = headers.get("location") diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index c753e64a1..f0715bfc7 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -43,10 +43,10 @@ class EdiskCz(SimpleHoster): self.logDebug('URL:' + url) - found = re.search(self.ACTION_PATTERN, url) - if found is None: + m = re.search(self.ACTION_PATTERN, url) + if m is None: self.parseError("ACTION") - action = found.group(1) + action = m.group(1) self.html = self.load(url, decode=True) self.getFileInfo() diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index 3ec319129..5365e7312 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -61,10 +61,10 @@ class EuroshareEu(SimpleHoster): if re.search(self.ERR_PARDL_PATTERN, self.html) is not None: self.longWait(5 * 60, 12) - found = re.search(self.FREE_URL_PATTERN, self.html) - if found is None: + m = re.search(self.FREE_URL_PATTERN, self.html) + if m is None: self.parseError("Parse error (URL)") - parsed_url = "http://euroshare.eu%s" % found.group(1) + parsed_url = "http://euroshare.eu%s" % m.group(1) self.logDebug("URL", parsed_url) self.download(parsed_url, disposition=True) diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index 4acbb12f8..e1fd9a666 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -48,9 +48,9 @@ class FastshareCz(SimpleHoster): if "> 100% of FREE slots are full" in self.html: self.retry(120, 60, "No free slots") - found = re.search(self.FREE_URL_PATTERN, self.html) - if found: - action, captcha_src = found.groups() + m = re.search(self.FREE_URL_PATTERN, self.html) + if m: + action, captcha_src = m.groups() else: self.parseError("Free URL") @@ -82,9 +82,9 @@ class FastshareCz(SimpleHoster): self.logWarning("Not enough traffic left") self.resetAccount() else: - found = re.search(self.PREMIUM_URL_PATTERN, self.html) - if found: - url = found.group(1) + m = re.search(self.PREMIUM_URL_PATTERN, self.html) + if m: + url = m.group(1) else: self.parseError("Premium URL") diff --git a/module/plugins/hoster/File4safeCom.py b/module/plugins/hoster/File4safeCom.py index da63316ad..bc0f20dbe 100644 --- a/module/plugins/hoster/File4safeCom.py +++ b/module/plugins/hoster/File4safeCom.py @@ -25,9 +25,9 @@ class File4safeCom(XFileSharingPro): self.header = self.req.http.header self.req.http.c.setopt(FOLLOWLOCATION, 1) - found = re.search(r"Location\s*:\s*(.*)", self.header, re.I) - if found and re.match(self.LINK_PATTERN, found.group(1)): - location = found.group(1).strip() + m = re.search(r"Location\s*:\s*(.*)", self.header, re.I) + if m and re.match(self.LINK_PATTERN, m.group(1)): + location = m.group(1).strip() self.startDownload(location) else: self.parseError("Unable to detect premium download link") diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index fadbdeb1d..8fc1ddca2 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -50,10 +50,10 @@ class FilecloudIo(SimpleHoster): def handleFree(self): data = {"ukey": self.file_info['ID']} - found = re.search(self.AB1_PATTERN, self.html) - if found is None: + m = re.search(self.AB1_PATTERN, self.html) + if m is None: self.parseError("__AB1") - data['__ab1'] = found.group(1) + data['__ab1'] = m.group(1) if not self.account: self.fail("User not logged in") @@ -76,8 +76,8 @@ class FilecloudIo(SimpleHoster): self.logDebug(response) if response['captcha']: recaptcha = ReCaptcha(self) - found = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) - captcha_key = found.group(1) if found else self.RECAPTCHA_KEY + m = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) + captcha_key = m.group(1) if m else self.RECAPTCHA_KEY data['ctype'] = "recaptcha" for _ in xrange(5): @@ -98,10 +98,10 @@ class FilecloudIo(SimpleHoster): if response['dl']: self.html = self.load('http://filecloud.io/download.html') - found = re.search(self.LINK_PATTERN % self.file_info['ID'], self.html) - if found is None: + m = re.search(self.LINK_PATTERN % self.file_info['ID'], self.html) + if m is None: self.parseError("Download URL") - download_url = found.group(1) + download_url = m.group(1) self.logDebug("Download URL: %s" % download_url) if "size" in self.file_info and self.file_info['size']: diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 013448b09..98a97121c 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -108,9 +108,9 @@ class FilefactoryCom(SimpleHoster): else: self.logInfo('You could enable "Direct Downloads" on http://filefactory.com/account/') html = self.load(self.pyfile.url) - found = re.search(self.LINK_PATTERN, html) - if found: - url = found.group(1) + m = re.search(self.LINK_PATTERN, html) + if m: + url = m.group(1) else: self.parseError('Unable to detect premium direct link') diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index e024df6df..93488236a 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -49,15 +49,15 @@ class FilepostCom(SimpleHoster): # Find token and captcha key file_id = re.match(self.__pattern__, self.pyfile.url).group(1) - found = re.search(self.FLP_TOKEN_PATTERN, self.html) - if found is None: + m = re.search(self.FLP_TOKEN_PATTERN, self.html) + if m is None: self.parseError("Token") - flp_token = found.group(1) + flp_token = m.group(1) - found = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) - if found is None: + m = re.search(self.RECAPTCHA_KEY_PATTERN, self.html) + if m is None: self.parseError("Captcha key") - captcha_key = found.group(1) + captcha_key = m.group(1) # Get wait time get_dict = {'SID': self.req.cj.getCookie('SID'), 'JsHttpRequest': str(int(time() * 10000)) + '-xml'} diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 97c931ee4..52f39bab8 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -151,10 +151,10 @@ class FileserveCom(Hoster): self.fail("Failed getting wait time") if self.__name__ == "FilejungleCom": - found = re.search(r'"waitTime":(\d+)', response) - if found is None: + m = re.search(r'"waitTime":(\d+)', response) + if m is None: self.fail("Cannot get wait time") - wait_time = int(found.group(1)) + wait_time = int(m.group(1)) else: wait_time = int(response) + 3 diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py index 85354db37..6a32b5325 100644 --- a/module/plugins/hoster/FourSharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -30,22 +30,22 @@ class FourSharedCom(SimpleHoster): if not self.account: self.fail("User not logged in") - found = re.search(self.DOWNLOAD_BUTTON_PATTERN, self.html) - if found: - link = found.group(1) + m = re.search(self.DOWNLOAD_BUTTON_PATTERN, self.html) + if m: + link = m.group(1) else: link = re.sub(r'/(download|get|file|document|photo|video|audio)/', r'/get/', self.pyfile.url) self.html = self.load(link) - found = re.search(self.DOWNLOAD_URL_PATTERN, self.html) - if found is None: + m = re.search(self.DOWNLOAD_URL_PATTERN, self.html) + if m is None: self.parseError('Download link') - link = found.group(1) + link = m.group(1) try: - found = re.search(self.FID_PATTERN, self.html) - response = self.load('http://www.4shared.com/web/d2/getFreeDownloadLimitInfo?fileId=%s' % found.group(1)) + m = re.search(self.FID_PATTERN, self.html) + response = self.load('http://www.4shared.com/web/d2/getFreeDownloadLimitInfo?fileId=%s' % m.group(1)) self.logDebug(response) except: pass diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index ec76d85b8..0b728495a 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -78,13 +78,13 @@ class FshareVn(SimpleHoster): self.checkErrors() - found = re.search(r'var count = (\d+)', self.html) - self.setWait(int(found.group(1)) if found else 30) + m = re.search(r'var count = (\d+)', self.html) + self.setWait(int(m.group(1)) if m else 30) - found = re.search(self.LINK_PATTERN, self.html) - if found is None: + m = re.search(self.LINK_PATTERN, self.html) + if m is None: self.parseError('FREE DL URL') - self.url = found.group(1) + self.url = m.group(1) self.logDebug("FREE DL URL: %s" % self.url) self.wait() @@ -97,10 +97,10 @@ class FshareVn(SimpleHoster): if '/error.php?' in self.req.lastEffectiveURL or u"Liên kết bạn chọn không tồn" in self.html: self.offline() - found = re.search(self.WAIT_PATTERN, self.html) - if found: - self.logInfo("Wait until %s ICT" % found.group(1)) - wait_until = mktime(strptime(found.group(1), "%d/%m/%Y %H:%M")) + m = re.search(self.WAIT_PATTERN, self.html) + if m: + self.logInfo("Wait until %s ICT" % m.group(1)) + wait_until = mktime(strptime(m.group(1), "%d/%m/%Y %H:%M")) self.wait(wait_until - mktime(gmtime()) - 7 * 60 * 60, True) self.retry() elif '