From c9b42f02f83a95d7741eee96247466d3b610b159 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 23 Oct 2015 13:29:12 +0200 Subject: self.html -> self.data --- module/plugins/hoster/AndroidfilehostCom.py | 4 ++-- module/plugins/hoster/BasketbuildCom.py | 8 ++++---- module/plugins/hoster/BezvadataCz.py | 16 ++++++++-------- module/plugins/hoster/BitshareCom.py | 10 +++++----- module/plugins/hoster/CatShareNet.py | 4 ++-- module/plugins/hoster/CloudzillaTo.py | 10 +++++----- module/plugins/hoster/CrockoCom.py | 8 ++++---- module/plugins/hoster/CzshareCom.py | 24 ++++++++++++------------ module/plugins/hoster/DailymotionCom.py | 4 ++-- module/plugins/hoster/DateiTo.py | 8 ++++---- module/plugins/hoster/DebridItaliaCom.py | 12 ++++++------ module/plugins/hoster/DepositfilesCom.py | 20 ++++++++++---------- module/plugins/hoster/EdiskCz.py | 4 ++-- module/plugins/hoster/EuroshareEu.py | 6 +++--- module/plugins/hoster/ExtabitCom.py | 12 ++++++------ module/plugins/hoster/FastixRu.py | 6 +++--- module/plugins/hoster/FastshareCz.py | 6 +++--- module/plugins/hoster/FileSharkPl.py | 14 +++++++------- module/plugins/hoster/FileStoreTo.py | 2 +- module/plugins/hoster/FileboomMe.py | 20 ++++++++++---------- module/plugins/hoster/FilecloudIo.py | 8 ++++---- module/plugins/hoster/FiledropperCom.py | 4 ++-- module/plugins/hoster/FilefactoryCom.py | 8 ++++---- module/plugins/hoster/FilepostCom.py | 6 +++--- module/plugins/hoster/FilepupNet.py | 2 +- module/plugins/hoster/FilerNet.py | 2 +- module/plugins/hoster/FilesMailRu.py | 12 ++++++------ module/plugins/hoster/FileserveCom.py | 8 ++++---- module/plugins/hoster/FourSharedCom.py | 8 ++++---- module/plugins/hoster/FreakshareCom.py | 26 +++++++++++++------------- module/plugins/hoster/FshareVn.py | 20 ++++++++++---------- module/plugins/hoster/GamefrontCom.py | 2 +- module/plugins/hoster/GoogledriveCom.py | 4 ++-- module/plugins/hoster/HighWayMe.py | 22 +++++++++++----------- module/plugins/hoster/HostujeNet.py | 2 +- module/plugins/hoster/IfolderRu.py | 10 +++++----- module/plugins/hoster/Keep2ShareCc.py | 24 ++++++++++++------------ module/plugins/hoster/KingfilesNet.py | 8 ++++---- module/plugins/hoster/LetitbitNet.py | 6 +++--- module/plugins/hoster/LoadTo.py | 4 ++-- module/plugins/hoster/LolabitsEs.py | 8 ++++---- module/plugins/hoster/MediafireCom.py | 10 +++++----- module/plugins/hoster/MegaRapidCz.py | 6 +++--- module/plugins/hoster/MegaRapidoNet.py | 4 ++-- module/plugins/hoster/MegasharesCom.py | 14 +++++++------- module/plugins/hoster/MultishareCz.py | 2 +- module/plugins/hoster/MyfastfileCom.py | 10 +++++----- module/plugins/hoster/MystoreTo.py | 2 +- module/plugins/hoster/MyvideoDe.py | 8 ++++---- module/plugins/hoster/NarodRu.py | 10 +++++----- module/plugins/hoster/NitroflareCom.py | 4 ++-- module/plugins/hoster/NosuploadCom.py | 8 ++++---- module/plugins/hoster/NowDownloadSx.py | 12 ++++++------ module/plugins/hoster/NowVideoSx.py | 4 ++-- module/plugins/hoster/OboomCom.py | 2 +- module/plugins/hoster/PornhostCom.py | 26 +++++++++++++------------- module/plugins/hoster/PornhubCom.py | 14 +++++++------- module/plugins/hoster/PromptfileCom.py | 4 ++-- module/plugins/hoster/QuickshareCz.py | 4 ++-- module/plugins/hoster/RapidgatorNet.py | 10 +++++----- module/plugins/hoster/RedtubeCom.py | 14 +++++++------- module/plugins/hoster/RemixshareCom.py | 4 ++-- module/plugins/hoster/SendspaceCom.py | 10 +++++----- module/plugins/hoster/ShareonlineBiz.py | 6 +++--- module/plugins/hoster/ShareplaceCom.py | 16 ++++++++-------- module/plugins/hoster/SimplyPremiumCom.py | 24 ++++++++++++------------ module/plugins/hoster/SimplydebridCom.py | 6 +++--- module/plugins/hoster/SizedriveCom.py | 4 ++-- module/plugins/hoster/SoundcloudCom.py | 4 ++-- module/plugins/hoster/SpeedyshareCom.py | 2 +- module/plugins/hoster/StreamCz.py | 8 ++++---- module/plugins/hoster/TurbobitNet.py | 16 ++++++++-------- module/plugins/hoster/UlozTo.py | 16 ++++++++-------- module/plugins/hoster/UloziskoSk.py | 10 +++++----- module/plugins/hoster/UnibytesCom.py | 8 ++++---- module/plugins/hoster/UpleaCom.py | 8 ++++---- module/plugins/hoster/UploadedTo.py | 4 ++-- module/plugins/hoster/UploadheroCom.py | 12 ++++++------ module/plugins/hoster/UploadingCom.py | 12 ++++++------ module/plugins/hoster/UpstoreNet.py | 10 +++++----- module/plugins/hoster/UserscloudCom.py | 2 +- module/plugins/hoster/VeehdCom.py | 14 +++++++------- module/plugins/hoster/VeohCom.py | 2 +- module/plugins/hoster/VimeoCom.py | 2 +- module/plugins/hoster/VkCom.py | 2 +- module/plugins/hoster/WrzucTo.py | 6 +++--- module/plugins/hoster/XHamsterCom.py | 20 ++++++++++---------- module/plugins/hoster/YadiSk.py | 4 ++-- module/plugins/hoster/YibaishiwuCom.py | 2 +- module/plugins/hoster/YoupornCom.py | 14 +++++++------- module/plugins/hoster/YourfilesTo.py | 16 ++++++++-------- module/plugins/hoster/ZippyshareCom.py | 4 ++-- 92 files changed, 414 insertions(+), 414 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/AndroidfilehostCom.py b/module/plugins/hoster/AndroidfilehostCom.py index 6bc318950..ae538364a 100644 --- a/module/plugins/hoster/AndroidfilehostCom.py +++ b/module/plugins/hoster/AndroidfilehostCom.py @@ -39,10 +39,10 @@ class AndroidfilehostCom(SimpleHoster): def handle_free(self, pyfile): - wait = re.search(self.WAIT_PATTERN, self.html) + wait = re.search(self.WAIT_PATTERN, self.data) self.log_debug("Waiting time: %s seconds" % wait.group(1)) - fid = re.search(r'id="fid" value="(\d+)" />', self.html).group(1) + fid = re.search(r'id="fid" value="(\d+)" />', self.data).group(1) self.log_debug("FID: %s" % fid) html = self.load("https://www.androidfilehost.com/libs/otf/mirrors.otf.php", diff --git a/module/plugins/hoster/BasketbuildCom.py b/module/plugins/hoster/BasketbuildCom.py index da4c64b56..8ee413c1a 100644 --- a/module/plugins/hoster/BasketbuildCom.py +++ b/module/plugins/hoster/BasketbuildCom.py @@ -37,8 +37,8 @@ class BasketbuildCom(SimpleHoster): def handle_free(self, pyfile): try: - link1 = re.search(r'href="(.+dlgate/.+)"', self.html).group(1) - self.html = self.load(link1) + link1 = re.search(r'href="(.+dlgate/.+)"', self.data).group(1) + self.data = self.load(link1) except AttributeError: self.error(_("Hop #1 not found")) @@ -47,7 +47,7 @@ class BasketbuildCom(SimpleHoster): self.log_debug("Next hop: %s" % link1) try: - wait = re.search(r'var sec = (\d+)', self.html).group(1) + wait = re.search(r'var sec = (\d+)', self.data).group(1) self.log_debug("Wait %s seconds" % wait) self.wait(wait) @@ -55,7 +55,7 @@ class BasketbuildCom(SimpleHoster): self.log_debug("No wait time found") try: - self.link = re.search(r'id="dlLink">\s*\s*', self.html) + m = re.search(r'', self.data) if m is None: self.error(_("Page 2 URL not found")) url = "http://bezvadata.cz%s" % m.group(1) self.log_debug("DL URL %s" % url) #: countdown - m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) + m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.data) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 120 self.wait(wait_time, False) @@ -69,9 +69,9 @@ class BezvadataCz(SimpleHoster): def check_errors(self): - if 'images/button-download-disable.png' in self.html: + if 'images/button-download-disable.png' in self.data: self.wait(5 * 60, 24, _("Download limit reached")) #: Parallel dl limit - elif '
([^<>]+?)([^<>]+?)Zadaný ověřovací kód nesouhlasí!" in self.html: + if u"
  • Zadaný ověřovací kód nesouhlasí!
  • " in self.data: self.retry_captcha() - elif re.search(self.MULTIDL_PATTERN, self.html): + elif re.search(self.MULTIDL_PATTERN, self.data): self.wait(5 * 60, 12, _("Download limit reached")) else: self.captcha.correct() - m = re.search("countdown_number = (\d+);", self.html) + m = re.search("countdown_number = (\d+);", self.data) self.set_wait(int(m.group(1)) if m else 50) #: Download the file, destination is determined by pyLoad diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py index e133416e7..7e98be18a 100644 --- a/module/plugins/hoster/DailymotionCom.py +++ b/module/plugins/hoster/DailymotionCom.py @@ -65,7 +65,7 @@ class DailymotionCom(Hoster): streams = [] for result in re.finditer(r"\"(?Phttp:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P.*?)\\.*?)\"", - self.html): + self.data): url = result.group('URL') qf = result.group('QF') @@ -123,7 +123,7 @@ class DailymotionCom(Hoster): self.check_info(pyfile) id = re.match(self.__pattern__, pyfile.url).group('ID') - self.html = self.load("http://www.dailymotion.com/embed/video/" + id) + self.data = self.load("http://www.dailymotion.com/embed/video/" + id) streams = self.get_streams() quality = self.get_quality() diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index 2a35efce6..808dac0e9 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -38,7 +38,7 @@ class DateiTo(SimpleHoster): for _i in xrange(3): self.log_debug("URL", url, "POST", data) - self.html = self.load(url, post=data) + self.data = self.load(url, post=data) self.check_errors() if url.endswith('download.php') and 'P' in data: @@ -48,7 +48,7 @@ class DateiTo(SimpleHoster): elif data['P'] == "IV": break - m = re.search(self.DATA_PATTERN, self.html) + m = re.search(self.DATA_PATTERN, self.data) if m is None: self.error(_("Data pattern not found")) @@ -60,11 +60,11 @@ class DateiTo(SimpleHoster): else: return - self.link = self.html + self.link = self.data def do_wait(self): - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) wait_time = int(m.group(1)) if m else 30 self.load('http://datei.to/ajax/download.php', post={'P': 'Ads'}) diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 6dd01277c..39cc548d9 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -26,20 +26,20 @@ class DebridItaliaCom(MultiHoster): def handle_premium(self, pyfile): - self.html = self.load("http://www.debriditalia.com/api.php", + self.data = self.load("http://www.debriditalia.com/api.php", get={'generate': "on", 'link': pyfile.url, 'p': self.get_password()}) - if "ERROR:" not in self.html: - self.link = self.html + if "ERROR:" not in self.data: + self.link = self.data else: - self.info['error'] = re.search(r'ERROR:(.*)', self.html).group(1).strip() + self.info['error'] = re.search(r'ERROR:(.*)', self.data).group(1).strip() - self.html = self.load("http://debriditalia.com/linkgen2.php", + self.data = self.load("http://debriditalia.com/linkgen2.php", post={'xjxfun' : "convertiLink", 'xjxargs[]': "S" % pyfile.url, 'xjxargs[]': "S%s" % self.get_password()}) try: - self.link = re.search(r'
    ' in self.html: + if '' in self.data: self.log_warning(_("Download limit reached")) self.retry(25, 60 * 60, "Download limit reached") - elif 'onClick="show_gold_offer' in self.html: + elif 'onClick="show_gold_offer' in self.data: self.account.relogin() self.retry() else: - link = re.search(self.LINK_PREMIUM_PATTERN, self.html) - mirror = re.search(self.LINK_MIRROR_PATTERN, self.html) + link = re.search(self.LINK_PREMIUM_PATTERN, self.data) + mirror = re.search(self.LINK_MIRROR_PATTERN, self.data) if link: self.link = link.group(1) diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index 6f05aa17c..2d594397f 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -41,10 +41,10 @@ class EdiskCz(SimpleHoster): self.error(_("ACTION_PATTERN not found")) action = m.group(1) - self.html = self.load(url) + self.data = self.load(url) self.get_fileInfo() - self.html = self.load(re.sub("/en/download/", "/en/download-slow/", url)) + self.data = self.load(re.sub("/en/download/", "/en/download-slow/", url)) url = self.load(re.sub("/en/download/", "/x-download/", url), post={ 'action': action diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index dacf9dcab..cc2da68ba 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -34,7 +34,7 @@ class EuroshareEu(SimpleHoster): def handle_premium(self, pyfile): - if self.ERROR_PATTERN in self.html: + if self.ERROR_PATTERN in self.data: self.account.relogin() self.retry(msg=_("User not logged in")) @@ -54,10 +54,10 @@ class EuroshareEu(SimpleHoster): def handle_free(self, pyfile): - if re.search(self.DL_LIMIT_PATTERN, self.html): + if re.search(self.DL_LIMIT_PATTERN, self.data): self.wait(5 * 60, 12, _("Download limit reached")) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index 02468a282..0eb69ba4d 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -32,13 +32,13 @@ class ExtabitCom(SimpleHoster): def handle_free(self, pyfile): - if r">Only premium users can download this file" in self.html: + if r">Only premium users can download this file" in self.data: self.fail(_("Only premium users can download this file")) - m = re.search(r"Next free download from your ip will be available in (\d+)\s*minutes", self.html) + m = re.search(r"Next free download from your ip will be available in (\d+)\s*minutes", self.data) if m is not None: self.wait(int(m.group(1)) * 60, True) - elif "The daily downloads limit from your IP is exceeded" in self.html: + elif "The daily downloads limit from your IP is exceeded" in self.data: self.log_warning(_("You have reached your daily downloads limit for today")) self.wait(seconds_to_midnight(), True) @@ -46,7 +46,7 @@ class ExtabitCom(SimpleHoster): m = re.match(self.__pattern__, self.req.http.lastEffectiveURL) fileID = m.group('ID') if m else self.info['pattern']['ID'] - m = re.search(r'recaptcha/api/challenge\?k=(\w+)', self.html) + m = re.search(r'recaptcha/api/challenge\?k=(\w+)', self.data) if m is not None: recaptcha = ReCaptcha(self) captcha_key = m.group(1) @@ -66,9 +66,9 @@ class ExtabitCom(SimpleHoster): if not "href" in res: self.error(_("Bad JSON response")) - self.html = self.load("http://extabit.com/file/%s%s" % (fileID, res['href'])) + self.data = self.load("http://extabit.com/file/%s%s" % (fileID, res['href'])) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index 9e7736647..cceabda53 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -28,15 +28,15 @@ class FastixRu(MultiHoster): def handle_premium(self, pyfile): - self.html = self.load("http://fastix.ru/api_v2/", + self.data = self.load("http://fastix.ru/api_v2/", get={'apikey': self.account.get_data('apikey'), 'sub' : "getdirectlink", 'link' : pyfile.url}) - data = json.loads(self.html) + data = json.loads(self.data) self.log_debug("Json data", data) - if "error\":true" in self.html: + if "error\":true" in self.data: self.offline() else: self.link = data['downloadlink'] diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index b1aeb3a2f..be6219d78 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -36,11 +36,11 @@ class FastshareCz(SimpleHoster): def check_errors(self): - if self.SLOT_ERROR in self.html: + if self.SLOT_ERROR in self.data: errmsg = self.info['error'] = _("No free slots") self.retry(12, 60, errmsg) - if self.CREDIT_ERROR in self.html: + if self.CREDIT_ERROR in self.data: errmsg = self.info['error'] = _("Not enough traffic left") self.log_warning(errmsg) self.restart(premium=False) @@ -49,7 +49,7 @@ class FastshareCz(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.FREE_URL_PATTERN, self.html) + m = re.search(self.FREE_URL_PATTERN, self.data) if m is not None: action, captcha_src = m.groups() else: diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index d6345a25b..6ea4cd634 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -50,12 +50,12 @@ class FileSharkPl(SimpleHoster): def check_errors(self): #: Check if file is now available for download (-> file name can be found in html body) - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: errmsg = self.info['error'] = _("Another download already run") self.retry(15, int(m.group(1)), errmsg) - m = re.search(self.ERROR_PATTERN, self.html) + m = re.search(self.ERROR_PATTERN, self.data) if m is not None: alert = m.group(1) @@ -75,15 +75,15 @@ class FileSharkPl(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("Download url not found")) link = urlparse.urljoin("http://fileshark.pl/", m.group(1)) - self.html = self.load(link) + self.data = self.load(link) - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: seconds = int(m.group(1)) self.log_debug("Wait %s seconds" % seconds) @@ -91,13 +91,13 @@ class FileSharkPl(SimpleHoster): action, inputs = self.parse_html_form('action=""') - m = re.search(self.TOKEN_PATTERN, self.html) + m = re.search(self.TOKEN_PATTERN, self.data) if m is None: self.retry(msg=_("Captcha form not found")) inputs['form[_token]'] = m.group(1) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is None: self.retry(msg=_("Captcha image not found")) diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py index dc709782d..7cb1ee827 100644 --- a/module/plugins/hoster/FileStoreTo.py +++ b/module/plugins/hoster/FileStoreTo.py @@ -34,7 +34,7 @@ class FileStoreTo(SimpleHoster): def handle_free(self, pyfile): self.wait(10) self.link = self.load("http://filestore.to/ajax/download.php", - get={'D': re.search(r'"D=(\w+)', self.html).group(1)}) + get={'D': re.search(r'"D=(\w+)', self.data).group(1)}) getInfo = create_getInfo(FileStoreTo) diff --git a/module/plugins/hoster/FileboomMe.py b/module/plugins/hoster/FileboomMe.py index 7472cde10..5b3087d8c 100644 --- a/module/plugins/hoster/FileboomMe.py +++ b/module/plugins/hoster/FileboomMe.py @@ -39,19 +39,19 @@ class FileboomMe(SimpleHoster): def handle_free(self, pyfile): post_url = urlparse.urljoin(pyfile.url, "file/" + self.info['pattern']['ID']) - m = re.search(r'data-slow-id="(\w+)"', self.html) + m = re.search(r'data-slow-id="(\w+)"', self.data) if m is not None: - self.html = self.load(post_url, + self.data = self.load(post_url, post={'slow_id': m.group(1)}) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.data) if m is not None: self.link = urlparse.urljoin(pyfile.url, m.group(0)) else: - m = re.search(r'', self.html) + m = re.search(r'', self.data) if m is None: - m = re.search(r'>\s*Please wait ([\d:]+)', self.html) + m = re.search(r'>\s*Please wait ([\d:]+)', self.data) if m is not None: wait_time = 0 for v in re.findall(r'(\d+)', m.group(1), re.I): @@ -62,26 +62,26 @@ class FileboomMe(SimpleHoster): else: uniqueId = m.group(1) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is not None: captcha = self.captcha.decrypt(urlparse.urljoin(pyfile.url, m.group(1))) - self.html = self.load(post_url, + self.data = self.load(post_url, post={'CaptchaForm[code]' : captcha, 'free' : 1, 'freeDownloadRequest': 1, 'uniqueId' : uniqueId}) - if 'The verification code is incorrect' in self.html: + if 'The verification code is incorrect' in self.data: self.retry_captcha() else: self.check_errors() - self.html = self.load(post_url, + self.data = self.load(post_url, post={'free' : 1, 'uniqueId': uniqueId}) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.data) if m is not None: self.link = urlparse.urljoin(pyfile.url, m.group(0)) diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index 800e0bee2..0c0cfc124 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -49,14 +49,14 @@ class FilecloudIo(SimpleHoster): def handle_free(self, pyfile): data = {'ukey': self.info['pattern']['ID']} - m = re.search(self.AB1_PATTERN, self.html) + m = re.search(self.AB1_PATTERN, self.data) if m is None: self.error(_("__AB1")) data['__ab1'] = m.group(1) recaptcha = ReCaptcha(self) - m = re.search(self.RECAPTCHA_PATTERN, self.html) + m = re.search(self.RECAPTCHA_PATTERN, self.data) captcha_key = m.group(1) if m else recaptcha.detect_key() if captcha_key is None: @@ -93,9 +93,9 @@ class FilecloudIo(SimpleHoster): if res['dl']: - self.html = self.load('http://filecloud.io/download.html') + self.data = self.load('http://filecloud.io/download.html') - m = re.search(self.LINK_FREE_PATTERN % self.info['pattern']['ID'], self.html) + m = re.search(self.LINK_FREE_PATTERN % self.info['pattern']['ID'], self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) diff --git a/module/plugins/hoster/FiledropperCom.py b/module/plugins/hoster/FiledropperCom.py index 1a193c0f7..761b85c7a 100644 --- a/module/plugins/hoster/FiledropperCom.py +++ b/module/plugins/hoster/FiledropperCom.py @@ -31,13 +31,13 @@ class FiledropperCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search(r'img id="img" src="(.+?)"', self.html) + m = re.search(r'img id="img" src="(.+?)"', self.data) if m is None: self.fail(_("Captcha not found")) captcha_code = self.captcha.decrypt("http://www.filedropper.com/%s" % m.group(1)) - m = re.search(r'method="post" action="(.+?)"', self.html) + m = re.search(r'method="post" action="(.+?)"', self.data) if m is not None: self.download(urlparse.urljoin("http://www.filedropper.com/", m.group(1)), post={'code': captcha_code}) diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index f839eb485..a2bc84505 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -46,18 +46,18 @@ class FilefactoryCom(SimpleHoster): def handle_free(self, pyfile): - if "Currently only Premium Members can download files larger than" in self.html: + if "Currently only Premium Members can download files larger than" in self.data: self.fail(_("File too large for free download")) - elif "All free download slots on this server are currently in use" in self.html: + elif "All free download slots on this server are currently in use" in self.data: self.retry(50, 15 * 60, _("All free slots are busy")) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: return self.link = m.group(1) - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: self.wait(m.group(1)) diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 99a8f64d8..42c2398b2 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -32,12 +32,12 @@ class FilepostCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.FLP_TOKEN_PATTERN, self.html) + m = re.search(self.FLP_TOKEN_PATTERN, self.data) if m is None: self.error(_("Token")) flp_token = m.group(1) - m = re.search(self.RECAPTCHA_PATTERN, self.html) + m = re.search(self.RECAPTCHA_PATTERN, self.data) if m is None: self.error(_("Captcha key")) captcha_key = m.group(1) @@ -52,7 +52,7 @@ class FilepostCom(SimpleHoster): post_dict = {'token': flp_token, 'code': self.info['pattern']['ID'], 'file_pass': ''} - if 'var is_pass_exists = true;' in self.html: + if 'var is_pass_exists = true;' in self.data: #: Solve password password = self.get_password() diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py index 1fa1da4b0..4bcfbe792 100644 --- a/module/plugins/hoster/FilepupNet.py +++ b/module/plugins/hoster/FilepupNet.py @@ -39,7 +39,7 @@ class FilepupNet(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: dl_link = m.group(1) self.download(dl_link, post={'task': "download"}) diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index db81c3f11..a85edd2e6 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -40,7 +40,7 @@ class FilerNet(SimpleHoster): if 'token' not in inputs: self.error(_("Unable to detect token")) - self.html = self.load(pyfile.url, post={'token': inputs['token']}) + self.data = self.load(pyfile.url, post={'token': inputs['token']}) inputs = self.parse_html_form(input_names={'hash': re.compile(r'.+')})[1] if 'hash' not in inputs: diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 5b183cafb..fb2bbbf50 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -49,14 +49,14 @@ class FilesMailRu(Hoster): def process(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.url_pattern = '(.+?)' #: Marks the file as "offline" when the pattern was found on the html-page''' - if r'
    ' in self.html: + if r'
    ' in self.data: self.offline() - elif r'Page cannot be displayed' in self.html: + elif r'Page cannot be displayed' in self.data: self.offline() #: The filename that will be showed in the list (e.g. test.part1.rar)''' @@ -82,16 +82,16 @@ class FilesMailRu(Hoster): def get_file_url(self): """ - Gives you the URL to the file. Extracted from the Files.mail.ru HTML-page stored in self.html + Gives you the URL to the file. Extracted from the Files.mail.ru HTML-page stored in self.data """ - return re.search(self.url_pattern, self.html).group(0).split('')[1].split('')[0] + return re.search(self.url_pattern, self.data).group(0).split(', event)">')[1].split('')[0] def my_post_process(self): diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 2d797eeb3..2e60ab120 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -81,16 +81,16 @@ class FileserveCom(Hoster): def handle_free(self): - self.html = self.load(self.url) + self.data = self.load(self.url) action = self.load(self.url, post={'checkDownload': "check"}) action = json.loads(action) self.log_debug(action) if "fail" in action: if action['fail'] == "timeLimit": - self.html = self.load(self.url, post={'checkDownload': "showError", 'errorType': "timeLimit"}) + self.data = self.load(self.url, post={'checkDownload': "showError", 'errorType': "timeLimit"}) - self.do_long_wait(re.search(self.LONG_WAIT_PATTERN, self.html)) + self.do_long_wait(re.search(self.LONG_WAIT_PATTERN, self.data)) elif action['fail'] == "parallelDownload": self.log_warning(_("Parallel download error, now waiting 60s")) @@ -157,7 +157,7 @@ class FileserveCom(Hoster): def do_captcha(self): - captcha_key = re.search(self.CAPTCHA_KEY_PATTERN, self.html).group(1) + captcha_key = re.search(self.CAPTCHA_KEY_PATTERN, self.data).group(1) recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge(captcha_key) diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py index e63121e2d..2e5e4011d 100644 --- a/module/plugins/hoster/FourSharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -38,22 +38,22 @@ class FourSharedCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.LINK_BTN_PATTERN, self.html) + m = re.search(self.LINK_BTN_PATTERN, self.data) if m is not None: link = m.group(1) else: link = re.sub(r'/(download|get|file|document|photo|video|audio)/', r'/get/', pyfile.url) - self.html = self.load(link) + self.data = self.load(link) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: return self.link = m.group(1) try: - m = re.search(self.ID_PATTERN, self.html) + m = re.search(self.ID_PATTERN, self.data) res = self.load('http://www.4shared.com/web/d2/getFreeDownloadLimitInfo?fileId=%s' % m.group(1)) self.log_debug(res) diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index 53fc839ad..e32264fae 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -35,7 +35,7 @@ class FreakshareCom(Hoster): pyfile.url = pyfile.url.replace("freakshare.net/", "freakshare.com/") if self.account: - self.html = self.load(pyfile.url, cookies=False) + self.data = self.load(pyfile.url, cookies=False) pyfile.name = self.get_file_name() self.download(pyfile.url) @@ -90,14 +90,14 @@ class FreakshareCom(Hoster): def download_html(self): self.load("http://freakshare.com/index.php", {'language': "EN"}) #: Set english language in server session - self.html = self.load(self.pyfile.url) + self.data = self.load(self.pyfile.url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() if not self.wantReconnect: self.req_opts = self.get_download_options() #: Get the Post options for the Request @@ -108,11 +108,11 @@ class FreakshareCom(Hoster): def get_file_name(self): - if not self.html: + if not self.data: self.download_html() if not self.wantReconnect: - m = re.search(r"([^ ]+)", self.html) + m = re.search(r"([^ ]+)", self.data) if m is not None: file_name = m.group(1) else: @@ -125,11 +125,11 @@ class FreakshareCom(Hoster): def get_file_size(self): size = 0 - if not self.html: + if not self.data: self.download_html() if not self.wantReconnect: - m = re.search(r"[^ ]+ - ([^ ]+) (\w\w)yte", self.html) + m = re.search(r"[^ ]+ - ([^ ]+) (\w\w)yte", self.data) if m is not None: units = float(m.group(1).replace(",", "")) pow = {'KB': 1, 'MB': 2, 'GB': 3}[m.group(2)] @@ -139,14 +139,14 @@ class FreakshareCom(Hoster): def get_waiting_time(self): - if not self.html: + if not self.data: self.download_html() - if "Your Traffic is used up for today" in self.html: + if "Your Traffic is used up for today" in self.data: self.wantReconnect = True return seconds_to_midnight() - timestring = re.search('\s*var\s(?:downloadWait|time)\s=\s(\d*)[\d.]*;', self.html) + timestring = re.search('\s*var\s(?:downloadWait|time)\s=\s(\d*)[\d.]*;', self.data) if timestring: return int(timestring.group(1)) else: @@ -157,9 +157,9 @@ class FreakshareCom(Hoster): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r"This file does not exist!", self.html): + if re.search(r"This file does not exist!", self.data): return False else: return True @@ -167,7 +167,7 @@ class FreakshareCom(Hoster): def get_download_options(self): re_envelope = re.search(r".*?value=\"Free\sDownload\".*?\n*?(.*?<.*?>\n*)*?\n*\s*?", - self.html).group(0) #: Get the whole request + self.data).group(0) #: Get the whole request to_sort = re.findall(r"", re_envelope) request_options = dict((n, v) for (v, n) in to_sort) diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 156a44128..698046d34 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -45,12 +45,12 @@ class FshareVn(SimpleHoster): def preload(self): - self.html = self.load("http://www.fshare.vn/check_link.php", + self.data = self.load("http://www.fshare.vn/check_link.php", post={'action': "check_link", 'arrlinks': pyfile.url}) def handle_free(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.check_errors() @@ -66,22 +66,22 @@ class FshareVn(SimpleHoster): if password: self.log_info(_("Password protected link, trying ") + password) inputs['link_file_pwd_dl'] = password - self.html = self.load(url, post=inputs) + self.data = self.load(url, post=inputs) - if 'name="link_file_pwd_dl"' in self.html: + if 'name="link_file_pwd_dl"' in self.data: self.fail(_("Wrong password")) else: self.fail(_("No password found")) else: - self.html = self.load(url, post=inputs) + self.data = self.load(url, post=inputs) self.check_errors() - m = re.search(r'var count = (\d+)', self.html) + m = re.search(r'var count = (\d+)', self.data) self.set_wait(int(m.group(1)) if m else 30) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) @@ -90,16 +90,16 @@ class FshareVn(SimpleHoster): def check_errors(self): - if '/error.php?' in self.req.lastEffectiveURL or u"Liên kết bạn chọn không tồn" in self.html: + if '/error.php?' in self.req.lastEffectiveURL or u"Liên kết bạn chọn không tồn" in self.data: self.offline() - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: self.log_info(_("Wait until %s ICT") % m.group(1)) wait_until = time.mktime.time(time.strptime.time(m.group(1), "%d/%m/%Y %H:%M")) self.wait(wait_until - time.mktime.time(time.gmtime.time()) - 7 * 60 * 60, True) self.retry() - elif '