diff options
Diffstat (limited to 'module/plugins/hoster')
92 files changed, 414 insertions, 414 deletions
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*<a href="(.+?)"', self.html).group(1) + self.link = re.search(r'id="dlLink">\s*<a href="(.+?)"', self.data).group(1) except AttributeError: self.error(_("DL-Link not found")) diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index 14613af4e..51607fd5a 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -32,36 +32,36 @@ class BezvadataCz(SimpleHoster): def handle_free(self, pyfile): #: Download button - m = re.search(r'<a class="stahnoutSoubor".*?href="(.*?)"', self.html) + m = re.search(r'<a class="stahnoutSoubor".*?href="(.*?)"', self.data) if m is None: self.error(_("Page 1 URL not found")) url = "http://bezvadata.cz%s" % m.group(1) #: Captcha form - self.html = self.load(url) + self.data = self.load(url) self.check_errors() action, inputs = self.parse_html_form('frm-stahnoutFreeForm') if not inputs: self.error(_("FreeForm")) - m = re.search(r'<img src="data:image/png;base64,(.*?)"', self.html) + m = re.search(r'<img src="data:image/png;base64,(.*?)"', self.data) if m is None: self.retry_captcha() inputs['captcha'] = self.captcha.decrypt_image(m.group(1).decode('base64'), input_type='png') #: Download url - self.html = self.load("http://bezvadata.cz%s" % action, post=inputs) + self.data = self.load("http://bezvadata.cz%s" % action, post=inputs) self.check_errors() - m = re.search(r'<a class="stahnoutSoubor2" href="(.*?)">', self.html) + m = re.search(r'<a class="stahnoutSoubor2" href="(.*?)">', 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 '<div class="infobox' in self.html: + elif '<div class="infobox' in self.data: self.temp_offline() else: return super(BezvadataCz, self).check_errors() diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index ea6bf091f..c5b20bc55 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -48,14 +48,14 @@ class BitshareCom(SimpleHoster): self.log_debug("File id is [%s]" % self.file_id) #: Load main page - self.html = self.load(pyfile.url, ref=False) + self.data = self.load(pyfile.url, ref=False) #: Check offline - if re.search(self.OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.data): self.offline() #: Check Traffic used up - if re.search(self.TRAFFIC_USED_UP, self.html): + if re.search(self.TRAFFIC_USED_UP, self.data): self.log_info(_("Your Traffic is used up for today")) self.wait(30 * 60, True) self.retry() @@ -64,13 +64,13 @@ class BitshareCom(SimpleHoster): m = re.match(self.__pattern__, pyfile.url) name1 = m.group('NAME') if m else None - m = re.search(self.INFO_PATTERN, self.html) + m = re.search(self.INFO_PATTERN, self.data) name2 = m.group('N') if m else None pyfile.name = max(name1, name2) #: Ajax file id - self.ajaxid = re.search(self.AJAXID_PATTERN, self.html).group(1) + self.ajaxid = re.search(self.AJAXID_PATTERN, self.data).group(1) self.log_debug("File ajax id is [%s]" % self.ajaxid) #: This may either download our file or forward us to an error page diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 83a44c636..8bac5bd74 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -42,11 +42,11 @@ class CatShareNet(SimpleHoster): recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge() - self.html = self.load(pyfile.url, + self.data = self.load(pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py index 6f6242eec..cf276e6dd 100644 --- a/module/plugins/hoster/CloudzillaTo.py +++ b/module/plugins/hoster/CloudzillaTo.py @@ -27,24 +27,24 @@ class CloudzillaTo(SimpleHoster): def check_errors(self): - if re.search(self.PASSWORD_PATTERN, self.html): + if re.search(self.PASSWORD_PATTERN, self.data): pw = self.get_password() if pw: - self.html = self.load(self.pyfile.url, get={'key': pw}) + self.data = self.load(self.pyfile.url, get={'key': pw}) else: self.fail(_("Missing password")) - if re.search(self.PASSWORD_PATTERN, self.html): + if re.search(self.PASSWORD_PATTERN, self.data): self.retry(msg="Wrong password") else: return super(CloudzillaTo, self).check_errors() def handle_free(self, pyfile): - self.html = self.load("http://www.cloudzilla.to/generateticket/", + self.data = self.load("http://www.cloudzilla.to/generateticket/", post={'file_id': self.info['pattern']['ID'], 'key': self.get_password()}) - ticket = dict(re.findall(r'<(.+?)>([^<>]+?)</', self.html)) + ticket = dict(re.findall(r'<(.+?)>([^<>]+?)</', self.data)) self.log_debug(ticket) diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py index 528d1cc4d..22747efad 100644 --- a/module/plugins/hoster/CrockoCom.py +++ b/module/plugins/hoster/CrockoCom.py @@ -35,19 +35,19 @@ class CrockoCom(SimpleHoster): def handle_free(self, pyfile): - if "You need Premium membership to download this file." in self.html: + if "You need Premium membership to download this file." in self.data: self.fail(_("You need Premium membership to download this file")) for _i in xrange(5): - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is not None: url = urlparse.urljoin("http://crocko.com/", m.group(1)) self.wait(m.group(2)) - self.html = self.load(url) + self.data = self.load(url) else: break - m = re.search(self.FORM_PATTERN, self.html, re.S) + m = re.search(self.FORM_PATTERN, self.data, re.S) if m is None: self.error(_("FORM_PATTERN not found")) diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 9b8bfb437..f483e3b13 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -43,11 +43,11 @@ class CzshareCom(SimpleHoster): def check_traffic(self): #: Check if user logged in - m = re.search(self.USER_CREDIT_PATTERN, self.html) + m = re.search(self.USER_CREDIT_PATTERN, self.data) if m is None: self.account.relogin() - self.html = self.load(self.pyfile.url) - m = re.search(self.USER_CREDIT_PATTERN, self.html) + self.data = self.load(self.pyfile.url) + m = re.search(self.USER_CREDIT_PATTERN, self.data) if m is None: return False @@ -69,7 +69,7 @@ class CzshareCom(SimpleHoster): def handle_premium(self, pyfile): try: - form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.S).group(1) + form = re.search(self.PREMIUM_FORM_PATTERN, self.data, re.S).group(1) inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) except Exception, e: @@ -82,7 +82,7 @@ class CzshareCom(SimpleHoster): def handle_free(self, pyfile): #: Get free url - m = re.search(self.FREE_URL_PATTERN, self.html) + m = re.search(self.FREE_URL_PATTERN, self.data) if m is None: self.error(_("FREE_URL_PATTERN not found")) @@ -91,12 +91,12 @@ class CzshareCom(SimpleHoster): self.log_debug("PARSED_URL:" + parsed_url) #: Get download ticket and parse html - self.html = self.load(parsed_url) - if re.search(self.MULTIDL_PATTERN, self.html): + self.data = self.load(parsed_url) + if re.search(self.MULTIDL_PATTERN, self.data): self.wait(5 * 60, 12, _("Download limit reached")) try: - form = re.search(self.FREE_FORM_PATTERN, self.html, re.S).group(1) + form = re.search(self.FREE_FORM_PATTERN, self.data, re.S).group(1) inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form)) pyfile.size = int(inputs['size']) @@ -107,18 +107,18 @@ class CzshareCom(SimpleHoster): #: Get and decrypt captcha captcha_url = 'http://sdilej.cz/captcha.php' inputs['captchastring2'] = self.captcha.decrypt(captcha_url) - self.html = self.load(parsed_url, post=inputs) + self.data = self.load(parsed_url, post=inputs) - if u"<li>ZadanÜ ovÄÅovacà kód nesouhlasÃ!</li>" in self.html: + if u"<li>ZadanÜ ovÄÅovacà kód nesouhlasÃ!</li>" 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"\"(?P<URL>http:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P<QF>.*?)\\.*?)\"", - 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<![CDATA[%s]]>" % pyfile.url, 'xjxargs[]': "S%s" % self.get_password()}) try: - self.link = re.search(r'<a href="(.+?)"', self.html).group(1) + self.link = re.search(r'<a href="(.+?)"', self.data).group(1) except AttributeError: pass diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 4516fface..92c2f4310 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -43,11 +43,11 @@ class DepositfilesCom(SimpleHoster): def handle_free(self, pyfile): - self.html = self.load(pyfile.url, post={'gateway_result': "1"}) + self.data = self.load(pyfile.url, post={'gateway_result': "1"}) self.check_errors() - m = re.search(r"var fid = '(\w+)';", self.html) + m = re.search(r"var fid = '(\w+)';", self.data) if m is None: self.retry(wait=5) params = {'fid': m.group(1)} @@ -60,29 +60,29 @@ class DepositfilesCom(SimpleHoster): if captcha_key is None: return - self.html = self.load("https://dfiles.eu/get_file.php", get=params) + self.data = self.load("https://dfiles.eu/get_file.php", get=params) - if '<input type=button value="Continue" onclick="check_recaptcha' in self.html: + if '<input type=button value="Continue" onclick="check_recaptcha' in self.data: params['response'], params['challenge'] = recaptcha.challenge(captcha_key) - self.html = self.load("https://dfiles.eu/get_file.php", get=params) + self.data = self.load("https://dfiles.eu/get_file.php", get=params) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = urllib.unquote(m.group(1)) def handle_premium(self, pyfile): - if '<span class="html_download_api-gold_traffic_limit">' in self.html: + if '<span class="html_download_api-gold_traffic_limit">' 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 <b>(\d+)\s*minutes", self.html) + m = re.search(r"Next free download from your ip will be available in <b>(\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'<input type="hidden" name="uniqueId" value="(\w+)">', self.html) + m = re.search(r'<input type="hidden" name="uniqueId" value="(\w+)">', 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 = '<a href="(.+?)" onclick="return Act\(this\, \'dlink\'\, event\)">(.+?)</a>' #: Marks the file as "offline" when the pattern was found on the html-page''' - if r'<div class="errorMessage mb10">' in self.html: + if r'<div class="errorMessage mb10">' 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('<a href="')[1].split('" onclick="return Act')[0] + return re.search(self.url_pattern, self.data).group(0).split('<a href="')[1].split('" onclick="return Act')[0] def get_file_name(self): """ Gives you the Name for each file. Also extracted from the HTML-Page """ - return re.search(self.url_pattern, self.html).group(0).split(', event)">')[1].split('</a>')[0] + return re.search(self.url_pattern, self.data).group(0).split(', event)">')[1].split('</a>')[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"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", self.html) + m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", 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"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte", self.html) + m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\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*?</form>", - self.html).group(0) #: Get the whole request + self.data).group(0) #: Get the whole request to_sort = re.findall(r"<input\stype=\"hidden\"\svalue=\"(.*?)\"\sname=\"(.*?)\"\s\/>", 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 '<ul class="message-error">' in self.html: + elif '<ul class="message-error">' in self.data: msg = "Unknown error occured or wait time not parsed" self.log_error(msg) self.retry(30, 2 * 60, msg) diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py index c94017946..588e96bd0 100644 --- a/module/plugins/hoster/GamefrontCom.py +++ b/module/plugins/hoster/GamefrontCom.py @@ -30,7 +30,7 @@ class GamefrontCom(SimpleHoster): def handle_free(self, pyfile): - self.html = self.load("http://www.gamefront.com/files/service/thankyou", + self.data = self.load("http://www.gamefront.com/files/service/thankyou", get={'id': self.info['pattern']['ID']}) return super(GamefrontCom, self).handle_free(pyfile) diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index 8d69457ed..7b8552ecd 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -39,7 +39,7 @@ class GoogledriveCom(SimpleHoster): def handle_free(self, pyfile): for _i in xrange(2): - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: return @@ -48,7 +48,7 @@ class GoogledriveCom(SimpleHoster): dl = self.isdownload(link, redirect=False) if not dl: - self.html = self.load(link) + self.data = self.load(link) else: self.link = dl break diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py index c3baf326d..391a55c2f 100644 --- a/module/plugins/hoster/HighWayMe.py +++ b/module/plugins/hoster/HighWayMe.py @@ -27,33 +27,33 @@ class HighWayMe(MultiHoster): def check_errors(self): - if self.html.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it. + if self.data.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it. self.account.relogin() self.retry() - elif "<code>9</code>" in self.html: + elif "<code>9</code>" in self.data: self.offline() - elif "downloadlimit" in self.html: + elif "downloadlimit" in self.data: self.log_warning(_("Reached maximum connctions")) self.retry(5, 60, _("Reached maximum connctions")) - elif "trafficlimit" in self.html: + elif "trafficlimit" in self.data: self.log_warning(_("Reached daily limit")) self.retry(wait=seconds_to_midnight(), msg="Daily limit for this host reached") - elif "<code>8</code>" in self.html: + elif "<code>8</code>" in self.data: self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) self.retry(5, 60, _("Hoster is temporarily unavailable")) def handle_premium(self, pyfile): for _i in xrange(5): - self.html = self.load("https://high-way.me/load.php", + self.data = self.load("https://high-way.me/load.php", get={'link': self.pyfile.url}) - if self.html: - self.log_debug("JSON data: " + self.html) + if self.data: + self.log_debug("JSON data: " + self.data) break else: self.log_info(_("Unable to get API data, waiting 1 minute and retry")) @@ -62,18 +62,18 @@ class HighWayMe(MultiHoster): self.check_errors() try: - self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.html).group(1) + self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.data).group(1) except AttributeError: self.pyfile.name = "" try: - self.pyfile.size = re.search(r'<size>(\d+)</size>', self.html).group(1) + self.pyfile.size = re.search(r'<size>(\d+)</size>', self.data).group(1) except AttributeError: self.pyfile.size = 0 - self.link = re.search(r'<download>([^<]+)</download>', self.html).group(1) + self.link = re.search(r'<download>([^<]+)</download>', self.data).group(1) getInfo = create_getInfo(HighWayMe) diff --git a/module/plugins/hoster/HostujeNet.py b/module/plugins/hoster/HostujeNet.py index 8b184159e..1ed357f4a 100644 --- a/module/plugins/hoster/HostujeNet.py +++ b/module/plugins/hoster/HostujeNet.py @@ -30,7 +30,7 @@ class HostujeNet(SimpleHoster): def handle_free(self, pyfile): - m = re.search(r'<script src="([\w^_]+.php)"></script>', self.html) + m = re.search(r'<script src="([\w^_]+.php)"></script>', self.data) if m is not None: jscript = self.load("http://hostuje.net/" + m.group(1)) m = re.search(r"\('(\w+\.php\?i=\w+)'\);", jscript) diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py index 6d38219aa..0e9d162ca 100644 --- a/module/plugins/hoster/IfolderRu.py +++ b/module/plugins/hoster/IfolderRu.py @@ -42,10 +42,10 @@ class IfolderRu(SimpleHoster): def handle_free(self, pyfile): url = "http://rusfolder.com/%s" % self.info['pattern']['ID'] - self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID']) + self.data = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID']) self.get_fileInfo() - session_id = re.search(self.SESSION_ID_PATTERN, self.html).groups() + session_id = re.search(self.SESSION_ID_PATTERN, self.data).groups() captcha_url = "http://ints.rusfolder.com/random/images/?session=%s" % session_id action, inputs = self.parse_html_form('id="download-step-one-form"') @@ -53,11 +53,11 @@ class IfolderRu(SimpleHoster): inputs['action'] = '1' self.log_debug(inputs) - self.html = self.load(url, post=inputs) - if self.WRONG_CAPTCHA_PATTERN in self.html: + self.data = self.load(url, post=inputs) + if self.WRONG_CAPTCHA_PATTERN in self.data: self.retry_captcha() - self.link = re.search(self.LINK_FREE_PATTERN, self.html).group(1) + self.link = re.search(self.LINK_FREE_PATTERN, self.data).group(1) getInfo = create_getInfo(IfolderRu) diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py index acf98f509..84d61a4f0 100644 --- a/module/plugins/hoster/Keep2ShareCc.py +++ b/module/plugins/hoster/Keep2ShareCc.py @@ -42,18 +42,18 @@ class Keep2ShareCc(SimpleHoster): def check_errors(self): - m = re.search(self.TEMP_ERROR_PATTERN, self.html) + m = re.search(self.TEMP_ERROR_PATTERN, self.data) if m is not None: self.info['error'] = m.group(1) self.wantReconnect = True self.retry(wait=30 * 60, msg=m.group(0)) - m = re.search(self.ERROR_PATTERN, self.html) + m = re.search(self.ERROR_PATTERN, self.data) if m is not None: errmsg = self.info['error'] = m.group(1) self.error(errmsg) - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: self.log_debug("Hoster told us to wait for %s" % m.group(1)) @@ -68,21 +68,21 @@ class Keep2ShareCc(SimpleHoster): def handle_free(self, pyfile): - self.fid = re.search(r'<input type="hidden" name="slow_id" value="(.+?)">', self.html).group(1) - self.html = self.load(pyfile.url, post={'yt0': '', 'slow_id': self.fid}) + self.fid = re.search(r'<input type="hidden" name="slow_id" value="(.+?)">', self.data).group(1) + self.data = self.load(pyfile.url, post={'yt0': '', 'slow_id': self.fid}) # self.log_debug(self.fid) # self.log_debug(pyfile.url) self.check_errors() - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.handle_captcha() self.wait(31) - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("Free download link not found")) @@ -95,10 +95,10 @@ class Keep2ShareCc(SimpleHoster): 'uniqueId' : self.fid, 'yt0' : ''} - m = re.search(r'id="(captcha-form)"', self.html) + m = re.search(r'id="(captcha-form)"', self.data) self.log_debug("Captcha form found", m) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) self.log_debug("CAPTCHA_PATTERN found %s" % m) if m is not None: captcha_url = urlparse.urljoin("http://keep2s.cc/", m.group(1)) @@ -109,9 +109,9 @@ class Keep2ShareCc(SimpleHoster): post_data.update({'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - self.html = self.load(self.pyfile.url, post=post_data) + self.data = self.load(self.pyfile.url, post=post_data) - if 'verification code is incorrect' in self.html: + if 'verification code is incorrect' in self.data: self.retry_captcha() else: self.captcha.correct() diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py index 8b9ddc4ac..28f33f040 100644 --- a/module/plugins/hoster/KingfilesNet.py +++ b/module/plugins/hoster/KingfilesNet.py @@ -46,13 +46,13 @@ class KingfilesNet(SimpleHoster): 'referer' : "", 'method_free': "+"} - self.html = self.load(pyfile.url, post=post_data) + self.data = self.load(pyfile.url, post=post_data) solvemedia = SolveMedia(self) response, challenge = solvemedia.challenge() #: Make the downloadlink appear and load the file - m = re.search(self.RAND_ID_PATTERN, self.html) + m = re.search(self.RAND_ID_PATTERN, self.data) if m is None: self.error(_("Random key not found")) @@ -69,9 +69,9 @@ class KingfilesNet(SimpleHoster): 'adcopy_challenge': challenge, 'down_direct' : "1"} - self.html = self.load(pyfile.url, post=post_data) + self.data = self.load(pyfile.url, post=post_data) - 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")) diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index 26712f410..cec0cb21b 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -67,14 +67,14 @@ class LetitbitNet(SimpleHoster): self.log_debug(action, inputs) inputs['desc'] = "" - self.html = self.load(urlparse.urljoin("http://letitbit.net/", action), post=inputs) + self.data = self.load(urlparse.urljoin("http://letitbit.net/", action), post=inputs) - m = re.search(self.SECONDS_PATTERN, self.html) + m = re.search(self.SECONDS_PATTERN, self.data) seconds = int(m.group(1)) if m else 60 self.log_debug("Seconds found", seconds) - m = re.search(self.CAPTCHA_CONTROL_FIELD, self.html) + m = re.search(self.CAPTCHA_CONTROL_FIELD, self.data) recaptcha_control_field = m.group(1) self.log_debug("ReCaptcha control field found", recaptcha_control_field) diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index a4ed4ef86..7da8e4462 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -43,14 +43,14 @@ class LoadTo(SimpleHoster): def handle_free(self, pyfile): #: Search for Download URL - 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")) self.link = m.group(1) #: Set Timer - may be obsolete - 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/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py index e91708a10..79abc857c 100644 --- a/module/plugins/hoster/LolabitsEs.py +++ b/module/plugins/hoster/LolabitsEs.py @@ -34,18 +34,18 @@ class LolabitsEs(SimpleHoster): def handle_free(self, pyfile): - fileid = re.search(self.FILEID_PATTERN, self.html).group(1) + fileid = re.search(self.FILEID_PATTERN, self.data).group(1) self.log_debug("FileID: " + fileid) - token = re.search(self.TOKEN_PATTERN, self.html).group(1) + token = re.search(self.TOKEN_PATTERN, self.data).group(1) self.log_debug("Token: " + token) - self.html = self.load("http://lolabits.es/action/License/Download", + self.data = self.load("http://lolabits.es/action/License/Download", post={'fileId' : fileid, '__RequestVerificationToken' : token}, decode="unicode-escape") - self.link = html_unescape(re.search(self.LINK_PATTERN, self.html).group(1)) + self.link = html_unescape(re.search(self.LINK_PATTERN, self.data).group(1)) getInfo = create_getInfo(LolabitsEs) diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py index 4870a10cd..c044b9edb 100644 --- a/module/plugins/hoster/MediafireCom.py +++ b/module/plugins/hoster/MediafireCom.py @@ -43,7 +43,7 @@ class MediafireCom(SimpleHoster): if captcha_key: response, challenge = solvemedia.challenge(captcha_key) - self.html = self.load("http://www.mediafire.com/?" + self.info['pattern']['ID'], + self.data = self.load("http://www.mediafire.com/?" + self.info['pattern']['ID'], post={'adcopy_challenge': challenge, 'adcopy_response' : response}) return @@ -53,23 +53,23 @@ class MediafireCom(SimpleHoster): if captcha_key: response, challenge = recaptcha.challenge(captcha_key) - self.html = self.load(self.pyfile.url, + self.data = self.load(self.pyfile.url, post={'g-recaptcha-response': response}) def handle_free(self, pyfile): self.handle_captcha() - if self.PASSWORD_PATTERN in self.html: + if self.PASSWORD_PATTERN in self.data: password = self.get_password() if not password: self.fail(_("No password found")) else: self.log_info(_("Password protected link, trying: ") + password) - self.html = self.load(self.link, post={'downloadp': password}) + self.data = self.load(self.link, post={'downloadp': password}) - if self.PASSWORD_PATTERN in self.html: + if self.PASSWORD_PATTERN in self.data: self.fail(_("Wrong password")) return super(MediafireCom, self).handle_free(pyfile) diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py index a854bec87..43fb1a798 100644 --- a/module/plugins/hoster/MegaRapidCz.py +++ b/module/plugins/hoster/MegaRapidCz.py @@ -54,13 +54,13 @@ class MegaRapidCz(SimpleHoster): def handle_premium(self, pyfile): - m = re.search(self.LINK_PREMIUM_PATTERN, self.html) + m = re.search(self.LINK_PREMIUM_PATTERN, self.data) if m is not None: self.link = m.group(1) - elif re.search(self.ERR_LOGIN_PATTERN, self.html): + elif re.search(self.ERR_LOGIN_PATTERN, self.data): self.relogin() self.retry(wait=60, msg=_("User login failed")) - elif re.search(self.ERR_CREDIT_PATTERN, self.html): + elif re.search(self.ERR_CREDIT_PATTERN, self.data): self.fail(_("Not enough credit left")) diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py index f14ff1e58..24f5d7182 100644 --- a/module/plugins/hoster/MegaRapidoNet.py +++ b/module/plugins/hoster/MegaRapidoNet.py @@ -42,7 +42,7 @@ class MegaRapidoNet(MultiHoster): def handle_premium(self, pyfile): - self.html = self.load("http://megarapido.net/gerar.php", + self.data = self.load("http://megarapido.net/gerar.php", post={'rand' :random_with_N_digits(16), 'urllist' : pyfile.url, 'links' : pyfile.url, @@ -51,7 +51,7 @@ class MegaRapidoNet(MultiHoster): 'user' : self.account.get_data('sid'), 'autoreset': ""}) - if "desloga e loga novamente para gerar seus links" in self.html.lower(): + if "desloga e loga novamente para gerar seus links" in self.data.lower(): self.error(_("You have logged in at another place")) return super(MegaRapidoNet, self).handle_premium(pyfile) diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py index a81a595cf..e041bb9cb 100644 --- a/module/plugins/hoster/MegasharesCom.py +++ b/module/plugins/hoster/MegasharesCom.py @@ -46,15 +46,15 @@ class MegasharesCom(SimpleHoster): def handle_free(self, pyfile): - if self.NO_SLOTS_PATTERN in self.html: + if self.NO_SLOTS_PATTERN in self.data: self.retry(wait=5 * 60) - m = re.search(self.REACTIVATE_PASSPORT_PATTERN, self.html) + m = re.search(self.REACTIVATE_PASSPORT_PATTERN, self.data) if m is not None: passport_num = m.group(1) - request_uri = re.search(self.REQUEST_URI_PATTERN, self.html).group(1) + request_uri = re.search(self.REQUEST_URI_PATTERN, self.data).group(1) - random_num = re.search(self.REACTIVATE_NUM_PATTERN, self.html).group(1) + random_num = re.search(self.REACTIVATE_NUM_PATTERN, self.data).group(1) verifyinput = self.captcha.decrypt("http://d01.megashares.com/index.php", get={'secgfx': "gfx", 'random_num': random_num}) @@ -75,7 +75,7 @@ class MegasharesCom(SimpleHoster): else: self.retry_captcha(msg=_("Failed to reactivate passport")) - m = re.search(self.PASSPORT_RENEW_PATTERN, self.html) + m = re.search(self.PASSPORT_RENEW_PATTERN, self.data) if m is not None: time = [int(x) for x in m.groups()] renew = time[0] + (time[1] * 60) + (time[2] * 60) @@ -83,7 +83,7 @@ class MegasharesCom(SimpleHoster): self.retry(wait=renew, msg=_("Passport renewal")) #: Check traffic left on passport - m = re.search(self.PASSPORT_LEFT_PATTERN, self.html, re.M | re.S) + m = re.search(self.PASSPORT_LEFT_PATTERN, self.data, re.M | re.S) if m is None: self.fail(_("Passport not found")) @@ -98,7 +98,7 @@ class MegasharesCom(SimpleHoster): def handle_download(self, premium=False): - m = re.search(self.LINK_PATTERN % (1 if premium else 2), self.html) + m = re.search(self.LINK_PATTERN % (1 if premium else 2), self.data) msg = _('%s download URL' % ('Premium' if premium else 'Free')) if m is None: self.error(msg) diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index 9ce08db22..8d143082c 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -39,7 +39,7 @@ class MultishareCz(SimpleHoster): def handle_multi(self, pyfile): - self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={'link': pyfile.url}) + self.data = self.load('http://www.multishare.cz/html/mms_ajax.php', post={'link': pyfile.url}) self.update_info() diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 9aaeafe34..acdec9f2b 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -27,17 +27,17 @@ class MyfastfileCom(MultiHoster): def handle_premium(self, pyfile): - self.html = self.load('http://myfastfile.com/api.php', + self.data = self.load('http://myfastfile.com/api.php', get={'user': self.account.user, 'pass': self.account.get_login('password'), 'link': pyfile.url}) - self.log_debug("JSON data: " + self.html) + self.log_debug("JSON data: " + self.data) - self.html = json.loads(self.html) - if self.html['status'] != 'ok': + self.data = json.loads(self.data) + if self.data['status'] != 'ok': self.fail(_("Unable to unrestrict link")) - self.link = self.html['link'] + self.link = self.data['link'] getInfo = create_getInfo(MyfastfileCom) diff --git a/module/plugins/hoster/MystoreTo.py b/module/plugins/hoster/MystoreTo.py index acf538d43..8477c62d2 100644 --- a/module/plugins/hoster/MystoreTo.py +++ b/module/plugins/hoster/MystoreTo.py @@ -36,7 +36,7 @@ class MystoreTo(SimpleHoster): def handle_free(self, pyfile): try: - fid = re.search(r'wert="(.+?)"', self.html).group(1) + fid = re.search(r'wert="(.+?)"', self.data).group(1) except AttributeError: self.error(_("File-ID not found")) diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py index eb1d283e2..ed2699bdf 100644 --- a/module/plugins/hoster/MyvideoDe.py +++ b/module/plugins/hoster/MyvideoDe.py @@ -28,19 +28,19 @@ class MyvideoDe(Hoster): def download_html(self): - self.html = self.load(self.pyfile.url) + self.data = self.load(self.pyfile.url) def get_file_url(self): - videoId = re.search(r"addVariable\('_videoid','(.*)'\);p.addParam\('quality'", self.html).group(1) - videoServer = re.search("rel='image_src' href='(.*)thumbs/.*' />", self.html).group(1) + videoId = re.search(r"addVariable\('_videoid','(.*)'\);p.addParam\('quality'", self.data).group(1) + videoServer = re.search("rel='image_src' href='(.*)thumbs/.*' />", self.data).group(1) file_url = videoServer + videoId + ".flv" return file_url def get_file_name(self): file_name_pattern = r'<h1 class=\'globalHd\'>(.*)</h1>' - return html_unescape(re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.flv') + return html_unescape(re.search(file_name_pattern, self.data).group(1).replace("/", "") + '.flv') def file_exists(self): diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 76c9530ea..1cb23deab 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -35,9 +35,9 @@ class NarodRu(SimpleHoster): def handle_free(self, pyfile): - self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random.random() * 777)) + self.data = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random.random() * 777)) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is None: self.error(_("Captcha")) @@ -45,14 +45,14 @@ class NarodRu(SimpleHoster): captcha_url, post_data['key'] = m.groups() post_data['rep'] = self.captcha.decrypt(captcha_url) - self.html = self.load(pyfile.url, post=post_data) + self.data = self.load(pyfile.url, post=post_data) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.captcha.correct() self.link = urlparse.urljoin("http://narod.ru/", m.group(1)) - elif u'<b class="error-msg"><strong>ÐÑОблОÑÑ?</strong>' in self.html: + elif u'<b class="error-msg"><strong>ÐÑОблОÑÑ?</strong>' in self.data: self.retry_captcha() diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py index c4d9809a0..5c2b42b23 100644 --- a/module/plugins/hoster/NitroflareCom.py +++ b/module/plugins/hoster/NitroflareCom.py @@ -38,7 +38,7 @@ class NitroflareCom(SimpleHoster): self.load(pyfile.url, post={'goToFreePage': ""}) self.load("http://nitroflare.com/ajax/setCookie.php", post={'fileId': self.info['pattern']['ID']}) - self.html = self.load("http://nitroflare.com/ajax/freeDownload.php", + self.data = self.load("http://nitroflare.com/ajax/freeDownload.php", post={'method': "startTimer", 'fileId': self.info['pattern']['ID']}) self.check_errors() @@ -56,7 +56,7 @@ class NitroflareCom(SimpleHoster): recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) - self.html = self.load("http://nitroflare.com/ajax/freeDownload.php", + self.data = self.load("http://nitroflare.com/ajax/freeDownload.php", post={'method' : "fetchDownload", 'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py index 43eb9f5a1..6f4f85ac1 100644 --- a/module/plugins/hoster/NosuploadCom.py +++ b/module/plugins/hoster/NosuploadCom.py @@ -30,17 +30,17 @@ class NosuploadCom(XFSHoster): def get_download_link(self): #: Stage1: press the "Free Download" button data = self.get_post_parameters() - self.html = self.load(self.pyfile.url, post=data) + self.data = self.load(self.pyfile.url, post=data) #: Stage2: wait some time and press the "Download File" button data = self.get_post_parameters() - wait_time = re.search(self.WAIT_PATTERN, self.html, re.M | re.S).group(1) + wait_time = re.search(self.WAIT_PATTERN, self.data, re.M | re.S).group(1) self.log_debug("Hoster told us to wait %s seconds" % wait_time) self.wait(wait_time) - self.html = self.load(self.pyfile.url, post=data) + self.data = self.load(self.pyfile.url, post=data) #: Stage3: get the download link - return re.search(self.LINK_PATTERN, self.html, re.S).group(1) + return re.search(self.LINK_PATTERN, self.data, re.S).group(1) getInfo = create_getInfo(NosuploadCom) diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py index de44e515d..2f58abde3 100644 --- a/module/plugins/hoster/NowDownloadSx.py +++ b/module/plugins/hoster/NowDownloadSx.py @@ -39,24 +39,24 @@ class NowDownloadSx(SimpleHoster): def handle_free(self, pyfile): - tokenlink = re.search(self.TOKEN_PATTERN, self.html) - continuelink = re.search(self.CONTINUE_PATTERN, self.html) + tokenlink = re.search(self.TOKEN_PATTERN, self.data) + continuelink = re.search(self.CONTINUE_PATTERN, self.data) if tokenlink is None or continuelink is None: self.error() - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: wait = int(m.group(1)) else: wait = 60 baseurl = "http://www.nowdownload.ch" - self.html = self.load(baseurl + str(tokenlink.group(1))) + self.data = self.load(baseurl + str(tokenlink.group(1))) self.wait(wait) - self.html = self.load(baseurl + str(continuelink.group(1))) + self.data = self.load(baseurl + str(continuelink.group(1))) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py index 1f65e4a97..22686ca86 100644 --- a/module/plugins/hoster/NowVideoSx.py +++ b/module/plugins/hoster/NowVideoSx.py @@ -35,9 +35,9 @@ class NowVideoSx(SimpleHoster): def handle_free(self, pyfile): - self.html = self.load("http://www.nowvideo.sx/mobile/video.php", get={'id': self.info['pattern']['ID']}) + self.data = self.load("http://www.nowvideo.sx/mobile/video.php", get={'id': self.info['pattern']['ID']}) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py index cbfda10c7..3361c19da 100644 --- a/module/plugins/hoster/OboomCom.py +++ b/module/plugins/hoster/OboomCom.py @@ -35,7 +35,7 @@ class OboomCom(Hoster): def process(self, pyfile): self.pyfile.url.replace(".com/#id=", ".com/#") self.pyfile.url.replace(".com/#/", ".com/#") - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.get_file_id(self.pyfile.url) self.get_session_token() self.get_fileInfo(self.session_token, self.file_id) diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py index 7520e261f..6901ae689 100644 --- a/module/plugins/hoster/PornhostCom.py +++ b/module/plugins/hoster/PornhostCom.py @@ -31,39 +31,39 @@ class PornhostCom(Hoster): #: Old interface def download_html(self): url = self.pyfile.url - self.html = self.load(url) + self.data = self.load(url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() - url = re.search(r'download this file</label>.*?<a href="(.*?)"', self.html) + url = re.search(r'download this file</label>.*?<a href="(.*?)"', self.data) if url is None: - url = re.search(r'"(http://dl\d+\.pornhost\.com/files/.*?/.*?/.*?/.*?/.*?/.*?\..*?)"', self.html) + url = re.search(r'"(http://dl\d+\.pornhost\.com/files/.*?/.*?/.*?/.*?/.*?/.*?\..*?)"', self.data) if url is None: - url = re.search(r'width: 894px; height: 675px">.*?<img src="(.*?)"', self.html) + url = re.search(r'width: 894px; height: 675px">.*?<img src="(.*?)"', self.data) if url is None: url = re.search(r'"http://file\d+\.pornhost\.com/\d+/.*?"', - self.html) #@TODO: fix this one since it doesn't match + self.data) #@TODO: fix this one since it doesn't match return url.group(1) def get_file_name(self): - if not self.html: + if not self.data: self.download_html() - name = re.search(r'<title>pornhost\.com - free file hosting with a twist - gallery(.*?)</title>', self.html) + name = re.search(r'<title>pornhost\.com - free file hosting with a twist - gallery(.*?)</title>', self.data) if name is None: - name = re.search(r'id="url" value="http://www\.pornhost\.com/(.*?)/"', self.html) + name = re.search(r'id="url" value="http://www\.pornhost\.com/(.*?)/"', self.data) if name is None: - name = re.search(r'<title>pornhost\.com - free file hosting with a twist -(.*?)</title>', self.html) + name = re.search(r'<title>pornhost\.com - free file hosting with a twist -(.*?)</title>', self.data) if name is None: - name = re.search(r'"http://file\d+\.pornhost\.com/.*?/(.*?)"', self.html) + name = re.search(r'"http://file\d+\.pornhost\.com/.*?/(.*?)"', self.data) name = name.group(1).strip() + ".flv" @@ -74,10 +74,10 @@ class PornhostCom(Hoster): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r'gallery not found|You will be redirected to', self.html): + if re.search(r'gallery not found|You will be redirected to', self.data): return False else: return True diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py index 5946497f1..b6ba01082 100644 --- a/module/plugins/hoster/PornhubCom.py +++ b/module/plugins/hoster/PornhubCom.py @@ -30,14 +30,14 @@ class PornhubCom(Hoster): def download_html(self): url = self.pyfile.url - self.html = self.load(url) + self.data = self.load(url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() url = "http://www.pornhub.com//gateway.php" @@ -64,14 +64,14 @@ class PornhubCom(Hoster): def get_file_name(self): - if not self.html: + if not self.data: self.download_html() - m = re.search(r'<title.+?>([^<]+) - ', self.html) + m = re.search(r'<title.+?>([^<]+) - ', self.data) if m is not None: name = m.group(1) else: - matches = re.findall('<h1>(.*?)</h1>', self.html) + matches = re.findall('<h1>(.*?)</h1>', self.data) if len(matches) > 1: name = matches[1] else: @@ -84,10 +84,10 @@ class PornhubCom(Hoster): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r'This video is no longer in our database or is in conversion', self.html): + if re.search(r'This video is no longer in our database or is in conversion', self.data): return False else: return True diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py index 3dde76400..e6ae1859c 100644 --- a/module/plugins/hoster/PromptfileCom.py +++ b/module/plugins/hoster/PromptfileCom.py @@ -29,7 +29,7 @@ class PromptfileCom(SimpleHoster): def handle_free(self, pyfile): #: STAGE 1: get link to continue - m = re.search(self.CHASH_PATTERN, self.html) + m = re.search(self.CHASH_PATTERN, self.data) if m is None: self.error(_("CHASH_PATTERN not found")) @@ -37,7 +37,7 @@ class PromptfileCom(SimpleHoster): self.log_debug("Read chash %s" % chash) #: Continue to stage2 - self.html = self.load(pyfile.url, post={'chash': chash}) + self.data = self.load(pyfile.url, post={'chash': chash}) #: STAGE 2: get the direct link return super(PromptfileCom, self).handle_free(pyfile) diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py index a65cf09b9..2cd576578 100644 --- a/module/plugins/hoster/QuickshareCz.py +++ b/module/plugins/hoster/QuickshareCz.py @@ -27,11 +27,11 @@ class QuickshareCz(SimpleHoster): def process(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.get_fileInfo() #: Parse js variables - self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html)) + self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.data)) self.log_debug(self.jsvars) pyfile.name = self.jsvars['ID3'] diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index e12c00f98..947723557 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -101,7 +101,7 @@ class RapidgatorNet(SimpleHoster): def handle_free(self, pyfile): - jsvars = dict(re.findall(self.JSVARS_PATTERN, self.html)) + jsvars = dict(re.findall(self.JSVARS_PATTERN, self.data)) self.log_debug(jsvars) self.req.http.lastURL = pyfile.url @@ -121,9 +121,9 @@ class RapidgatorNet(SimpleHoster): self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With:"]) url = "http://rapidgator.net%s" % jsvars.get('captchaUrl', '/download/captcha') - self.html = self.load(url) + self.data = self.load(url) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) else: @@ -134,11 +134,11 @@ class RapidgatorNet(SimpleHoster): response, challenge = captcha.challenge() - self.html = self.load(url, post={'DownloadCaptchaForm[captcha]': "", + self.data = self.load(url, post={'DownloadCaptchaForm[captcha]': "", 'adcopy_challenge' : challenge, 'adcopy_response' : response}) - if "The verification code is incorrect" in self.html: + if "The verification code is incorrect" in self.data: self.retry_captcha() else: self.captcha.correct() diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py index 4d93e0149..4791e87c7 100644 --- a/module/plugins/hoster/RedtubeCom.py +++ b/module/plugins/hoster/RedtubeCom.py @@ -31,34 +31,34 @@ class RedtubeCom(Hoster): def download_html(self): url = self.pyfile.url - self.html = self.load(url) + self.data = self.load(url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() - return html_unescape(re.search(r'hashlink=(http.*?)"', self.html).group(1)) + return html_unescape(re.search(r'hashlink=(http.*?)"', self.data).group(1)) def get_file_name(self): - if not self.html: + if not self.data: self.download_html() - return re.search('<title>(.*?)- RedTube - Free Porn Videos</title>', self.html).group(1).strip() + ".flv" + return re.search('<title>(.*?)- RedTube - Free Porn Videos</title>', self.data).group(1).strip() + ".flv" def file_exists(self): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r'This video has been removed.', self.html): + if re.search(r'This video has been removed.', self.data): return False else: return True diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index c4c88d945..32717237a 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -46,11 +46,11 @@ class RemixshareCom(SimpleHoster): def handle_free(self, pyfile): - b = re.search(self.LINK_PATTERN, self.html) + b = re.search(self.LINK_PATTERN, self.data) if not b: self.error(_("File url")) - c = re.search(self.TOKEN_PATTERN, self.html) + c = re.search(self.TOKEN_PATTERN, self.data) if not c: self.error(_("File token")) diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py index 721cc3bd4..d9f9d9f98 100644 --- a/module/plugins/hoster/SendspaceCom.py +++ b/module/plugins/hoster/SendspaceCom.py @@ -31,17 +31,17 @@ class SendspaceCom(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: self.link = m.group(1) else: - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is None: params = {'download': "Regular Download"} else: captcha_url1 = "http://www.sendspace.com/" + m.group(1) - m = re.search(self.USER_CAPTCHA_PATTERN, self.html) + m = re.search(self.USER_CAPTCHA_PATTERN, self.data) captcha_url2 = "http://www.sendspace.com/" + m.group(1) params = {'captcha_hash': m.group(2), 'captcha_submit': 'Verify', @@ -49,9 +49,9 @@ class SendspaceCom(SimpleHoster): self.log_debug(params) - self.html = self.load(pyfile.url, post=params) + self.data = self.load(pyfile.url, post=params) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.retry_captcha() else: diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 56d25f6cb..68fc22171 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -68,7 +68,7 @@ class ShareonlineBiz(SimpleHoster): recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY) - m = re.search(r'var wait=(\d+);', self.html) + m = re.search(r'var wait=(\d+);', self.data) self.set_wait(int(m.group(1)) if m else 30) res = self.load("%s/free/captcha/%d" % (self.pyfile.url, int(time.time() * 1000)), @@ -85,7 +85,7 @@ class ShareonlineBiz(SimpleHoster): def handle_free(self, pyfile): self.wait(3) - self.html = self.load("%s/free/" % pyfile.url, + self.data = self.load("%s/free/" % pyfile.url, post={'dl_free': "1", 'choice': "free"}) self.check_errors() @@ -154,7 +154,7 @@ class ShareonlineBiz(SimpleHoster): errmsg = m.group(1).lower() try: - self.log_error(errmsg, re.search(self.ERROR_PATTERN, self.html).group(1)) + self.log_error(errmsg, re.search(self.ERROR_PATTERN, self.data).group(1)) except Exception: self.log_error(_("Unknown error occurred"), errmsg) diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index 88d3ad7e4..914c58db6 100644 --- a/module/plugins/hoster/ShareplaceCom.py +++ b/module/plugins/hoster/ShareplaceCom.py @@ -36,11 +36,11 @@ class ShareplaceCom(Hoster): def get_waiting_time(self): - if not self.html: + if not self.data: self.download_html() #: var zzipitime = 15 - m = re.search(r'var zzipitime = (\d+);', self.html) + m = re.search(r'var zzipitime = (\d+);', self.data) if m is not None: sec = int(m.group(1)) else: @@ -51,14 +51,14 @@ class ShareplaceCom(Hoster): def download_html(self): url = re.sub("shareplace.com\/\?", "shareplace.com//index1.php/?a=", self.pyfile.url) - self.html = self.load(url) + self.data = self.load(url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - url = re.search(r"var beer = '(.*?)';", self.html) + url = re.search(r"var beer = '(.*?)';", self.data) if url: url = url.group(1) url = urllib.unquote( @@ -71,20 +71,20 @@ class ShareplaceCom(Hoster): def get_file_name(self): - if not self.html: + if not self.data: self.download_html() - return re.search("<title>\s*(.*?)\s*</title>", self.html).group(1) + return re.search("<title>\s*(.*?)\s*</title>", self.data).group(1) def file_exists(self): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r"HTTP Status 404", self.html): + if re.search(r"HTTP Status 404", self.data): return False else: return True diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index cc48db4fd..43aeabb24 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -27,33 +27,33 @@ class SimplyPremiumCom(MultiHoster): def check_errors(self): - if '<valid>0</valid>' in self.html or ( - "You are not allowed to download from this host" in self.html and self.premium): + if '<valid>0</valid>' in self.data or ( + "You are not allowed to download from this host" in self.data and self.premium): self.account.relogin() self.retry() - elif "NOTFOUND" in self.html: + elif "NOTFOUND" in self.data: self.offline() - elif "downloadlimit" in self.html: + elif "downloadlimit" in self.data: self.log_warning(_("Reached maximum connctions")) self.retry(5, 60, _("Reached maximum connctions")) - elif "trafficlimit" in self.html: + elif "trafficlimit" in self.data: self.log_warning(_("Reached daily limit for this host")) self.retry(wait=seconds_to_midnight(), msg="Daily limit for this host reached") - elif "hostererror" in self.html: + elif "hostererror" in self.data: self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) self.retry(5, 60, _("Hoster is temporarily unavailable")) def handle_premium(self, pyfile): for i in xrange(5): - self.html = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url}) + self.data = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url}) - if self.html: - self.log_debug("JSON data: " + self.html) + if self.data: + self.log_debug("JSON data: " + self.data) break else: self.log_info(_("Unable to get API data, waiting 1 minute and retry")) @@ -62,19 +62,19 @@ class SimplyPremiumCom(MultiHoster): self.check_errors() try: - self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.html).group(1) + self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.data).group(1) except AttributeError: self.pyfile.name = "" try: - self.pyfile.size = re.search(r'<size>(\d+)</size>', self.html).group(1) + self.pyfile.size = re.search(r'<size>(\d+)</size>', self.data).group(1) except AttributeError: self.pyfile.size = 0 try: - self.link = re.search(r'<download>([^<]+)</download>', self.html).group(1) + self.link = re.search(r'<download>([^<]+)</download>', self.data).group(1) except AttributeError: self.link = 'http://www.simply-premium.com/premium.php?link=' + self.pyfile.url diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index e76b7afa0..12ab8a395 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -34,11 +34,11 @@ class SimplydebridCom(MultiHoster): if 'fileparadox' in self.link: self.link = self.link.replace("http://", "https://") - self.html = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) - if 'tiger Link' in self.html or 'Invalid Link' in self.html or ('API' in self.html and 'ERROR' in self.html): + self.data = self.load("http://simply-debrid.com/api.php", get={'dl': self.link}) + if 'tiger Link' in self.data or 'Invalid Link' in self.data or ('API' in self.data and 'ERROR' in self.data): self.error(_("Unable to unrestrict link")) - self.link = self.html + self.link = self.data self.wait(5) diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py index 9659d9438..47c0c077c 100644 --- a/module/plugins/hoster/SizedriveCom.py +++ b/module/plugins/hoster/SizedriveCom.py @@ -32,10 +32,10 @@ class SizedriveCom(SimpleHoster): def handle_free(self, pyfile): self.wait(5) - self.html = self.load("http://www.sizedrive.com/getdownload.php", + self.data = self.load("http://www.sizedrive.com/getdownload.php", post={'id': self.info['pattern']['ID']}) - m = re.search(r'<span id="boton_download" ><a href="(.+?)"', self.html) + m = re.search(r'<span id="boton_download" ><a href="(.+?)"', self.data) if m is not None: self.link = m.group(1) diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py index 8baf7190a..f31fc74fc 100644 --- a/module/plugins/hoster/SoundcloudCom.py +++ b/module/plugins/hoster/SoundcloudCom.py @@ -28,13 +28,13 @@ class SoundcloudCom(SimpleHoster): def handle_free(self, pyfile): try: - song_id = re.search(r'sounds:(\d+)"', self.html).group(1) + song_id = re.search(r'sounds:(\d+)"', self.data).group(1) except Exception: self.error(_("Could not find song id")) try: - client_id = re.search(r'"clientID":"(.+?)"', self.html).group(1) + client_id = re.search(r'"clientID":"(.+?)"', self.data).group(1) except Exception: client_id = "b45b1aa10f1ac2941910a7f0d10f8e28" diff --git a/module/plugins/hoster/SpeedyshareCom.py b/module/plugins/hoster/SpeedyshareCom.py index 5a5292deb..c38a232fe 100644 --- a/module/plugins/hoster/SpeedyshareCom.py +++ b/module/plugins/hoster/SpeedyshareCom.py @@ -37,7 +37,7 @@ class SpeedyshareCom(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.link = m.group(1) diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py index c5f53d90a..d6c129236 100644 --- a/module/plugins/hoster/StreamCz.py +++ b/module/plugins/hoster/StreamCz.py @@ -46,12 +46,12 @@ class StreamCz(Hoster): def process(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) - if re.search(self.OFFLINE_PATTERN, self.html): + if re.search(self.OFFLINE_PATTERN, self.data): self.offline() - m = re.search(self.CDN_PATTERN, self.html) + m = re.search(self.CDN_PATTERN, self.data) if m is None: self.error(_("CDN_PATTERN not found")) cdn = m.groupdict() @@ -63,7 +63,7 @@ class StreamCz(Hoster): else: self.fail(_("Stream URL not found")) - m = re.search(self.NAME_PATTERN, self.html) + m = re.search(self.NAME_PATTERN, self.data) if m is None: self.error(_("NAME_PATTERN not found")) pyfile.name = "%s-%s.%s.mp4" % (m.group(2), m.group(1), cdnkey[-2:]) diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index e174962cb..cda9a2503 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -45,7 +45,7 @@ class TurbobitNet(SimpleHoster): def handle_free(self, pyfile): - self.html = self.load("http://turbobit.net/download/free/%s" % self.info['pattern']['ID']) + self.data = self.load("http://turbobit.net/download/free/%s" % self.info['pattern']['ID']) rtUpdate = self.get_rt_update() @@ -53,17 +53,17 @@ class TurbobitNet(SimpleHoster): self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"]) - self.html = self.load(self.get_download_url(rtUpdate)) + self.data = self.load(self.get_download_url(rtUpdate)) self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With:"]) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) def solve_captcha(self): - m = re.search(self.LIMIT_WAIT_PATTERN, self.html) + m = re.search(self.LIMIT_WAIT_PATTERN, self.data) if m is not None: wait_time = int(m.group(1)) self.wait(wait_time, wait_time > 60) @@ -79,7 +79,7 @@ class TurbobitNet(SimpleHoster): recaptcha = ReCaptcha(self) inputs['recaptcha_response_field'], inputs['recaptcha_challenge_field'] = recaptcha.challenge() else: - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is None: self.error(_("Captcha pattern not found")) captcha_url = m.group(1) @@ -87,9 +87,9 @@ class TurbobitNet(SimpleHoster): self.log_debug(inputs) - self.html = self.load(self.url, post=inputs) + self.data = self.load(self.url, post=inputs) - if '<div class="captcha-error">Incorrect, try again' in self.html: + if '<div class="captcha-error">Incorrect, try again' in self.data: self.retry_captcha() else: self.captcha.correct() @@ -123,7 +123,7 @@ class TurbobitNet(SimpleHoster): def get_download_url(self, rtUpdate): self.req.http.lastURL = self.url - m = re.search("(/\w+/timeout\.js\?\w+=)([^\"\'<>]+)", self.html) + m = re.search("(/\w+/timeout\.js\?\w+=)([^\"\'<>]+)", self.data) if m is not None: url = "http://turbobit.net%s%s" % m.groups() else: diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index a2363bea1..bb35fdfd6 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -91,33 +91,33 @@ class UlozTo(SimpleHoster): def check_errors(self): - if re.search(self.ADULT_PATTERN, self.html): + if re.search(self.ADULT_PATTERN, self.data): self.log_info(_("Adult content confirmation needed")) - m = re.search(self.TOKEN_PATTERN, self.html) + m = re.search(self.TOKEN_PATTERN, self.data) if m is None: self.error(_("TOKEN_PATTERN not found")) - self.html = self.load(pyfile.url, + self.data = self.load(pyfile.url, get={'do': "askAgeForm-submit"}, post={'agree': "Confirm", '_token_': m.group(1)}) - if self.PASSWD_PATTERN in self.html: + if self.PASSWD_PATTERN in self.data: password = self.get_password() if password: self.log_info(_("Password protected link, trying ") + password) - self.html = self.load(pyfile.url, + self.data = self.load(pyfile.url, get={'do': "passwordProtectedForm-submit"}, post={'password': password, 'password_send': 'Send'}) - if self.PASSWD_PATTERN in self.html: + if self.PASSWD_PATTERN in self.data: self.fail(_("Wrong password")) else: self.fail(_("No password found")) - if re.search(self.VIPLINK_PATTERN, self.html): - self.html = self.load(pyfile.url, get={'disclaimer': "1"}) + if re.search(self.VIPLINK_PATTERN, self.data): + self.data = self.load(pyfile.url, get={'disclaimer': "1"}) return super(UlozTo, self).check_errors() diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py index 2178813f4..2b61fe4aa 100644 --- a/module/plugins/hoster/UloziskoSk.py +++ b/module/plugins/hoster/UloziskoSk.py @@ -32,10 +32,10 @@ class UloziskoSk(SimpleHoster): def process(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.get_fileInfo() - m = re.search(self.IMG_PATTERN, self.html) + m = re.search(self.IMG_PATTERN, self.data) if m is not None: self.link = "http://ulozisko.sk" + m.group(1) else: @@ -43,19 +43,19 @@ class UloziskoSk(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(_("LINK_FREE_PATTERN not found")) parsed_url = 'http://www.ulozisko.sk' + m.group(1) - m = re.search(self.ID_PATTERN, self.html) + m = re.search(self.ID_PATTERN, self.data) if m is None: self.error(_("ID_PATTERN not found")) id = m.group(1) self.log_debug("URL:" + parsed_url + ' ID:' + id) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is None: self.error(_("CAPTCHA_PATTERN not found")) diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py index dcb616ec2..f06b10010 100644 --- a/module/plugins/hoster/UnibytesCom.py +++ b/module/plugins/hoster/UnibytesCom.py @@ -36,7 +36,7 @@ class UnibytesCom(SimpleHoster): for _i in xrange(3): self.log_debug(action, post_data) - self.html = self.load(urlparse.urljoin(domain, action), + self.data = self.load(urlparse.urljoin(domain, action), post=post_data, redirect=False) @@ -45,12 +45,12 @@ class UnibytesCom(SimpleHoster): self.link = m.group(1) break - if '>Somebody else is already downloading using your IP-address<' in self.html: + if '>Somebody else is already downloading using your IP-address<' in self.data: self.wait(10 * 60, True) self.restart() if post_data['step'] == "last": - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.captcha.correct() self.link = m.group(1) @@ -62,7 +62,7 @@ class UnibytesCom(SimpleHoster): action, post_data = self.parse_html_form('id="stepForm"') if last_step == "timer": - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) self.wait(m.group(1) if m else 60, False) elif last_step in ("captcha", "last"): diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 68b754b69..521e9eb7a 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -43,19 +43,19 @@ class UpleaCom(XFSHoster): def handle_free(self, pyfile): - m = re.search(self.STEP_PATTERN, self.html) + m = re.search(self.STEP_PATTERN, self.data) if m is None: self.error(_("STEP_PATTERN not found")) - self.html = self.load(urlparse.urljoin("http://uplea.com/", m.group(1))) + self.data = self.load(urlparse.urljoin("http://uplea.com/", 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.log_debug("Waiting %s seconds" % m.group(1)) self.wait(m.group(1), True) self.retry() - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.data) if m is None: self.error(_("LINK_PATTERN not found")) diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 273066a8d..4029f8ac4 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -70,12 +70,12 @@ class UploadedTo(SimpleHoster): def handle_free(self, pyfile): self.load("http://uploaded.net/language/en", just_header=True) - self.html = self.load("http://uploaded.net/js/download.js") + self.data = self.load("http://uploaded.net/js/download.js") recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge() - self.html = self.load("http://uploaded.net/io/ticket/captcha/%s" % self.info['pattern']['ID'], + self.data = self.load("http://uploaded.net/io/ticket/captcha/%s" % self.info['pattern']['ID'], post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) self.check_errors() diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index 151a5ca41..8b0b4ff73 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -41,27 +41,27 @@ class UploadheroCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is None: self.error(_("Captcha not found")) captcha = self.captcha.decrypt(urlparse.urljoin("http://uploadhero.co/", m.group(1))) - self.html = self.load(pyfile.url, + self.data = self.load(pyfile.url, get={'code': captcha}) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: self.link = m.group(1) or m.group(2) self.wait(50) def check_errors(self): - m = re.search(self.IP_BLOCKED_PATTERN, self.html) + m = re.search(self.IP_BLOCKED_PATTERN, self.data) if m is not None: - self.html = self.load(urlparse.urljoin("http://uploadhero.co/", m.group(1))) + self.data = self.load(urlparse.urljoin("http://uploadhero.co/", m.group(1))) - m = re.search(self.IP_WAIT_PATTERN, self.html) + m = re.search(self.IP_WAIT_PATTERN, self.data) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 5 * 60 self.wait(wait_time, True) self.retry() diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 7b3395be4..9d394f44e 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -37,7 +37,7 @@ class UploadingCom(SimpleHoster): if not "/get/" in pyfile.url: pyfile.url = pyfile.url.replace("/files", "/files/get") - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.get_fileInfo() if self.premium: @@ -51,8 +51,8 @@ class UploadingCom(SimpleHoster): 'code' : self.info['pattern']['ID'], 'pass' : 'undefined'} - self.html = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) - url = re.search(r'"link"\s*:\s*"(.*?)"', self.html) + self.data = self.load('http://uploading.com/files/get/?JsHttpRequest=%d-xml' % timestamp(), post=postData) + url = re.search(r'"link"\s*:\s*"(.*?)"', self.data) if url: self.link = url.group(1).replace("\\/", "/") @@ -60,7 +60,7 @@ class UploadingCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search('<h2>((Daily )?Download Limit)</h2>', self.html) + m = re.search('<h2>((Daily )?Download Limit)</h2>', self.data) if m is not None: pyfile.error = encode(m.group(1)) self.log_warning(pyfile.error) @@ -86,8 +86,8 @@ class UploadingCom(SimpleHoster): else: self.error(_("No AJAX/URL")) - self.html = self.load(url) - m = re.search(r'<form id="file_form" action="(.*?)"', self.html) + self.data = self.load(url) + m = re.search(r'<form id="file_form" action="(.*?)"', self.data) if m is not None: url = m.group(1) else: diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py index f57fd6519..55efcba0f 100644 --- a/module/plugins/hoster/UpstoreNet.py +++ b/module/plugins/hoster/UpstoreNet.py @@ -31,14 +31,14 @@ class UpstoreNet(SimpleHoster): def handle_free(self, pyfile): #: STAGE 1: get link to continue - m = re.search(self.CHASH_PATTERN, self.html) + m = re.search(self.CHASH_PATTERN, self.data) if m is None: self.error(_("CHASH_PATTERN not found")) chash = m.group(1) self.log_debug("Read hash " + chash) #: Continue to stage2 post_data = {'hash': chash, 'free': 'Slow download'} - self.html = self.load(pyfile.url, post=post_data) + self.data = self.load(pyfile.url, post=post_data) #: STAGE 2: solv captcha and wait #: First get the infos we need: recaptcha key and wait time @@ -46,7 +46,7 @@ class UpstoreNet(SimpleHoster): #: Try the captcha 5 times for i in xrange(5): - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is None: self.error(_("Wait pattern not found")) wait_time = int(m.group(1)) @@ -59,10 +59,10 @@ class UpstoreNet(SimpleHoster): post_data.update({'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response}) - self.html = self.load(pyfile.url, post=post_data) + self.data = self.load(pyfile.url, post=post_data) #: STAGE 3: get direct link - m = re.search(self.LINK_FREE_PATTERN, self.html, re.S) + m = re.search(self.LINK_FREE_PATTERN, self.data, re.S) if m is not None: break diff --git a/module/plugins/hoster/UserscloudCom.py b/module/plugins/hoster/UserscloudCom.py index 9a68b15b5..b211faff2 100644 --- a/module/plugins/hoster/UserscloudCom.py +++ b/module/plugins/hoster/UserscloudCom.py @@ -32,7 +32,7 @@ class UserscloudCom(SimpleHoster): def handle_free(self, pyfile): self.download(pyfile.url, - post=dict(re.findall(r'<input type="hidden" name="(.+?)" value="(.*?)">', self.html))) + post=dict(re.findall(r'<input type="hidden" name="(.+?)" value="(.*?)">', self.data))) getInfo = create_getInfo(UserscloudCom) diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py index 007505d12..7fa30e461 100644 --- a/module/plugins/hoster/VeehdCom.py +++ b/module/plugins/hoster/VeehdCom.py @@ -38,23 +38,23 @@ class VeehdCom(Hoster): def download_html(self): url = self.pyfile.url self.log_debug("Requesting page: %s" % url) - self.html = self.load(url) + self.data = self.load(url) def file_exists(self): - if not self.html: + if not self.data: self.download_html() - if '<title>Veehd</title>' in self.html: + if '<title>Veehd</title>' in self.data: return False return True def get_file_name(self): - if not self.html: + if not self.data: self.download_html() - m = re.search(r'<title.*?>([^<]+) on Veehd</title>', self.html) + m = re.search(r'<title.*?>([^<]+) on Veehd</title>', self.data) if m is None: self.error(_("Video title not found")) @@ -73,11 +73,11 @@ class VeehdCom(Hoster): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() m = re.search(r'<embed type="video/divx" src="(http://([^/]*\.)?veehd\.com/dl/.+?)"', - self.html) + self.data) if m is None: self.error(_("Embedded video url not found")) diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py index 15199ef5c..71a544800 100644 --- a/module/plugins/hoster/VeohCom.py +++ b/module/plugins/hoster/VeohCom.py @@ -42,7 +42,7 @@ class VeohCom(SimpleHoster): for q in quality: pattern = r'"fullPreviewHash%sPath":"(.+?)"' % q - m = re.search(pattern, self.html) + m = re.search(pattern, self.data) if m is not None: pyfile.name += ".mp4" self.link = m.group(1).replace("\\", "") diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py index 4d321a1ed..100ea0e8e 100644 --- a/module/plugins/hoster/VimeoCom.py +++ b/module/plugins/hoster/VimeoCom.py @@ -40,7 +40,7 @@ class VimeoCom(SimpleHoster): def handle_free(self, pyfile): password = self.get_password() - if self.js and 'class="btn iconify_down_b"' in self.html: + if self.js and 'class="btn iconify_down_b"' in self.data: html = self.js.eval(self.load(pyfile.url, get={'action': "download", 'password': password})) pattern = r'href="(?P<URL>http://vimeo\.com.+?)".*?\>(?P<QL>.+?) ' else: diff --git a/module/plugins/hoster/VkCom.py b/module/plugins/hoster/VkCom.py index b32e5d2d0..0b38fdd4e 100644 --- a/module/plugins/hoster/VkCom.py +++ b/module/plugins/hoster/VkCom.py @@ -30,7 +30,7 @@ class VkCom(SimpleHoster): def handle_free(self, pyfile): - self.link = re.findall(self.LINK_FREE_PATTERN, self.html)[0 if self.get_config('quality') == "Low" else -1] + self.link = re.findall(self.LINK_FREE_PATTERN, self.data)[0 if self.get_config('quality') == "Low" else -1] getInfo = create_getInfo(VkCom) diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py index f0a36f32f..831bbb73b 100644 --- a/module/plugins/hoster/WrzucTo.py +++ b/module/plugins/hoster/WrzucTo.py @@ -32,7 +32,7 @@ class WrzucTo(SimpleHoster): def handle_free(self, pyfile): - data = dict(re.findall(r'(md5|file): "(.*?)"', self.html)) + data = dict(re.findall(r'(md5|file): "(.*?)"', self.data)) if len(data) != 2: self.error(_("No file ID")) @@ -41,9 +41,9 @@ class WrzucTo(SimpleHoster): self.load("http://www.wrzuc.to/ajax/server/prepair", post={'md5': data['md5']}) self.req.http.lastURL = pyfile.url - self.html = self.load("http://www.wrzuc.to/ajax/server/download_link", post={'file': data['file']}) + self.data = self.load("http://www.wrzuc.to/ajax/server/download_link", post={'file': data['file']}) - data.update(re.findall(r'"(download_link|server_id)":"(.*?)"', self.html)) + data.update(re.findall(r'"(download_link|server_id)":"(.*?)"', self.data)) if len(data) != 4: self.error(_("No download URL")) diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py index e13a209d1..0e78f01cd 100644 --- a/module/plugins/hoster/XHamsterCom.py +++ b/module/plugins/hoster/XHamsterCom.py @@ -45,18 +45,18 @@ class XHamsterCom(Hoster): def download_html(self): url = self.pyfile.url - self.html = self.load(url) + self.data = self.load(url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() flashvar_pattern = re.compile('flashvars = ({.*?});', re.S) - json_flashvar = flashvar_pattern.search(self.html) + json_flashvar = flashvar_pattern.search(self.data) if not json_flashvar: self.error(_("flashvar not found")) @@ -77,7 +77,7 @@ class XHamsterCom(Hoster): self.error(_("url_mode not found")) if self.desired_fmt == ".mp4": - file_url = re.search(r"<a href=\"" + srv_url + "(.+?)\"", self.html) + file_url = re.search(r"<a href=\"" + srv_url + "(.+?)\"", self.data) if file_url is None: self.error(_("file_url not found")) @@ -101,20 +101,20 @@ class XHamsterCom(Hoster): def get_file_name(self): - if not self.html: + if not self.data: self.download_html() pattern = r'<title>(.*?) - xHamster\.com</title>' - name = re.search(pattern, self.html) + name = re.search(pattern, self.data) if name is None: pattern = r'<h1 >(.*)</h1>' - name = re.search(pattern, self.html) + name = re.search(pattern, self.data) if name is None: pattern = r'http://[www.]+xhamster\.com/movies/.*/(.*?)\.html?' name = re.match(file_name_pattern, self.pyfile.url) if name is None: pattern = r'<div id="element_str_id" style="display:none;">(.*)</div>' - name = re.search(pattern, self.html) + name = re.search(pattern, self.data) if name is None: return "Unknown" @@ -125,9 +125,9 @@ class XHamsterCom(Hoster): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r"(.*Video not found.*)", self.html): + if re.search(r"(.*Video not found.*)", self.data): return False else: return True diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py index 579046caf..1a8df173d 100644 --- a/module/plugins/hoster/YadiSk.py +++ b/module/plugins/hoster/YadiSk.py @@ -72,7 +72,7 @@ class YadiSk(SimpleHoster): try: - self.html = self.load("https://yadi.sk/models/", + self.data = self.load("https://yadi.sk/models/", get={'_m': "do-get-resource-url"}, post={'idClient': self.info['idclient'], 'version' : self.info['version'], @@ -80,7 +80,7 @@ class YadiSk(SimpleHoster): 'sk' : self.info['sk'], 'id.0' : self.info['id']}) - self.link = json.loads(self.html)['models'][0]['data']['file'] + self.link = json.loads(self.data)['models'][0]['data']['file'] except Exception: pass diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py index ec350b09d..ec69aa13c 100644 --- a/module/plugins/hoster/YibaishiwuCom.py +++ b/module/plugins/hoster/YibaishiwuCom.py @@ -30,7 +30,7 @@ class YibaishiwuCom(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(_("LINK_FREE_PATTERN not found")) diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py index 3a01b55ed..a135b61ab 100644 --- a/module/plugins/hoster/YoupornCom.py +++ b/module/plugins/hoster/YoupornCom.py @@ -31,34 +31,34 @@ class YoupornCom(Hoster): def download_html(self): url = self.pyfile.url - self.html = self.load(url, post={'user_choice': "Enter"}, cookies=False) + self.data = self.load(url, post={'user_choice': "Enter"}, cookies=False) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() - return re.search(r'(http://download\.youporn\.com/download/\d+\?save=1)">', self.html).group(1) + return re.search(r'(http://download\.youporn\.com/download/\d+\?save=1)">', self.data).group(1) def get_file_name(self): - if not self.html: + if not self.data: self.download_html() file_name_pattern = r'<title>(.+) - ' - return re.search(file_name_pattern, self.html).group(1).replace("&", "&").replace("/", "") + '.flv' + return re.search(file_name_pattern, self.data).group(1).replace("&", "&").replace("/", "") + '.flv' def file_exists(self): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r"(.*invalid video_id.*)", self.html): + if re.search(r"(.*invalid video_id.*)", self.data): return False else: return True diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index b5aca71cc..aea4e8b7a 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -37,11 +37,11 @@ class YourfilesTo(Hoster): def get_waiting_time(self): - if not self.html: + if not self.data: self.download_html() #: var zzipitime = 15 - m = re.search(r'var zzipitime = (\d+);', self.html) + m = re.search(r'var zzipitime = (\d+);', self.data) if m is not None: sec = int(m.group(1)) else: @@ -52,14 +52,14 @@ class YourfilesTo(Hoster): def download_html(self): url = self.pyfile.url - self.html = self.load(url) + self.data = self.load(url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - url = re.search(r"var bla = '(.*?)';", self.html) + url = re.search(r"var bla = '(.*?)';", self.data) if url: url = url.group(1) url = urllib.unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", "")) @@ -69,20 +69,20 @@ class YourfilesTo(Hoster): def get_file_name(self): - if not self.html: + if not self.data: self.download_html() - return re.search("<title>(.*)</title>", self.html).group(1) + return re.search("<title>(.*)</title>", self.data).group(1) def file_exists(self): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r"HTTP Status 404", self.html): + if re.search(r"HTTP Status 404", self.data): return False else: return True diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 7266660f9..be77af5cd 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -46,7 +46,7 @@ class ZippyshareCom(SimpleHoster): if captcha_key: try: - self.link = re.search(self.LINK_PREMIUM_PATTERN, self.html) + self.link = re.search(self.LINK_PREMIUM_PATTERN, self.data) recaptcha.challenge() except Exception, e: @@ -61,7 +61,7 @@ class ZippyshareCom(SimpleHoster): def get_link(self): #: Get all the scripts inside the html body - soup = BeautifulSoup.BeautifulSoup(self.html) + soup = BeautifulSoup.BeautifulSoup(self.data) scripts = (s.getText().strip() for s in soup.body.findAll('script', type='text/javascript')) #: Meant to be populated with the initialization of all the DOM elements found in the scripts |