From c9b42f02f83a95d7741eee96247466d3b610b159 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 23 Oct 2015 13:29:12 +0200 Subject: self.html -> self.data --- module/plugins/crypter/ChipDe.py | 4 ++-- module/plugins/crypter/CloudzillaToFolder.py | 6 +++--- module/plugins/crypter/DataHuFolder.py | 6 +++--- module/plugins/crypter/DevhostStFolder.py | 4 ++-- module/plugins/crypter/DlProtectCom.py | 16 +++++++------- module/plugins/crypter/EmbeduploadCom.py | 4 ++-- module/plugins/crypter/FilecryptCc.py | 20 ++++++++--------- module/plugins/crypter/FreakhareComFolder.py | 2 +- module/plugins/crypter/FreetexthostCom.py | 2 +- module/plugins/crypter/Go4UpCom.py | 2 +- module/plugins/crypter/ImgurComAlbum.py | 2 +- module/plugins/crypter/LinkCryptWs.py | 26 +++++++++++----------- module/plugins/crypter/LinkdecrypterCom.py | 16 +++++++------- module/plugins/crypter/LixIn.py | 14 ++++++------ module/plugins/crypter/MegaCoNzFolder.py | 4 ++-- module/plugins/crypter/MultiUpOrg.py | 6 +++--- module/plugins/crypter/MultiloadCz.py | 6 +++--- module/plugins/crypter/NCryptIn.py | 18 ++++++++-------- module/plugins/crypter/RelinkUs.py | 24 ++++++++++----------- module/plugins/crypter/SafelinkingNet.py | 16 +++++++------- module/plugins/crypter/ShareLinksBiz.py | 32 ++++++++++++++-------------- module/plugins/crypter/TnyCz.py | 2 +- module/plugins/crypter/TusfilesNetFolder.py | 4 ++-- module/plugins/hoster/AndroidfilehostCom.py | 4 ++-- module/plugins/hoster/BasketbuildCom.py | 8 +++---- module/plugins/hoster/BezvadataCz.py | 16 +++++++------- module/plugins/hoster/BitshareCom.py | 10 ++++----- module/plugins/hoster/CatShareNet.py | 4 ++-- module/plugins/hoster/CloudzillaTo.py | 10 ++++----- module/plugins/hoster/CrockoCom.py | 8 +++---- module/plugins/hoster/CzshareCom.py | 24 ++++++++++----------- module/plugins/hoster/DailymotionCom.py | 4 ++-- module/plugins/hoster/DateiTo.py | 8 +++---- module/plugins/hoster/DebridItaliaCom.py | 12 +++++------ module/plugins/hoster/DepositfilesCom.py | 20 ++++++++--------- module/plugins/hoster/EdiskCz.py | 4 ++-- module/plugins/hoster/EuroshareEu.py | 6 +++--- module/plugins/hoster/ExtabitCom.py | 12 +++++------ module/plugins/hoster/FastixRu.py | 6 +++--- module/plugins/hoster/FastshareCz.py | 6 +++--- module/plugins/hoster/FileSharkPl.py | 14 ++++++------ module/plugins/hoster/FileStoreTo.py | 2 +- module/plugins/hoster/FileboomMe.py | 20 ++++++++--------- module/plugins/hoster/FilecloudIo.py | 8 +++---- module/plugins/hoster/FiledropperCom.py | 4 ++-- module/plugins/hoster/FilefactoryCom.py | 8 +++---- module/plugins/hoster/FilepostCom.py | 6 +++--- module/plugins/hoster/FilepupNet.py | 2 +- module/plugins/hoster/FilerNet.py | 2 +- module/plugins/hoster/FilesMailRu.py | 12 +++++------ module/plugins/hoster/FileserveCom.py | 8 +++---- module/plugins/hoster/FourSharedCom.py | 8 +++---- module/plugins/hoster/FreakshareCom.py | 26 +++++++++++----------- module/plugins/hoster/FshareVn.py | 20 ++++++++--------- module/plugins/hoster/GamefrontCom.py | 2 +- module/plugins/hoster/GoogledriveCom.py | 4 ++-- module/plugins/hoster/HighWayMe.py | 22 +++++++++---------- module/plugins/hoster/HostujeNet.py | 2 +- module/plugins/hoster/IfolderRu.py | 10 ++++----- module/plugins/hoster/Keep2ShareCc.py | 24 ++++++++++----------- module/plugins/hoster/KingfilesNet.py | 8 +++---- module/plugins/hoster/LetitbitNet.py | 6 +++--- module/plugins/hoster/LoadTo.py | 4 ++-- module/plugins/hoster/LolabitsEs.py | 8 +++---- module/plugins/hoster/MediafireCom.py | 10 ++++----- module/plugins/hoster/MegaRapidCz.py | 6 +++--- module/plugins/hoster/MegaRapidoNet.py | 4 ++-- module/plugins/hoster/MegasharesCom.py | 14 ++++++------ module/plugins/hoster/MultishareCz.py | 2 +- module/plugins/hoster/MyfastfileCom.py | 10 ++++----- module/plugins/hoster/MystoreTo.py | 2 +- module/plugins/hoster/MyvideoDe.py | 8 +++---- module/plugins/hoster/NarodRu.py | 10 ++++----- module/plugins/hoster/NitroflareCom.py | 4 ++-- module/plugins/hoster/NosuploadCom.py | 8 +++---- module/plugins/hoster/NowDownloadSx.py | 12 +++++------ module/plugins/hoster/NowVideoSx.py | 4 ++-- module/plugins/hoster/OboomCom.py | 2 +- module/plugins/hoster/PornhostCom.py | 26 +++++++++++----------- module/plugins/hoster/PornhubCom.py | 14 ++++++------ module/plugins/hoster/PromptfileCom.py | 4 ++-- module/plugins/hoster/QuickshareCz.py | 4 ++-- module/plugins/hoster/RapidgatorNet.py | 10 ++++----- module/plugins/hoster/RedtubeCom.py | 14 ++++++------ module/plugins/hoster/RemixshareCom.py | 4 ++-- module/plugins/hoster/SendspaceCom.py | 10 ++++----- module/plugins/hoster/ShareonlineBiz.py | 6 +++--- module/plugins/hoster/ShareplaceCom.py | 16 +++++++------- module/plugins/hoster/SimplyPremiumCom.py | 24 ++++++++++----------- module/plugins/hoster/SimplydebridCom.py | 6 +++--- module/plugins/hoster/SizedriveCom.py | 4 ++-- module/plugins/hoster/SoundcloudCom.py | 4 ++-- module/plugins/hoster/SpeedyshareCom.py | 2 +- module/plugins/hoster/StreamCz.py | 8 +++---- module/plugins/hoster/TurbobitNet.py | 16 +++++++------- module/plugins/hoster/UlozTo.py | 16 +++++++------- module/plugins/hoster/UloziskoSk.py | 10 ++++----- module/plugins/hoster/UnibytesCom.py | 8 +++---- module/plugins/hoster/UpleaCom.py | 8 +++---- module/plugins/hoster/UploadedTo.py | 4 ++-- module/plugins/hoster/UploadheroCom.py | 12 +++++------ module/plugins/hoster/UploadingCom.py | 12 +++++------ module/plugins/hoster/UpstoreNet.py | 10 ++++----- module/plugins/hoster/UserscloudCom.py | 2 +- module/plugins/hoster/VeehdCom.py | 14 ++++++------ module/plugins/hoster/VeohCom.py | 2 +- module/plugins/hoster/VimeoCom.py | 2 +- module/plugins/hoster/VkCom.py | 2 +- module/plugins/hoster/WrzucTo.py | 6 +++--- module/plugins/hoster/XHamsterCom.py | 20 ++++++++--------- module/plugins/hoster/YadiSk.py | 4 ++-- module/plugins/hoster/YibaishiwuCom.py | 2 +- module/plugins/hoster/YoupornCom.py | 14 ++++++------ module/plugins/hoster/YourfilesTo.py | 16 +++++++------- module/plugins/hoster/ZippyshareCom.py | 4 ++-- module/plugins/internal/Base.py | 12 +++++------ module/plugins/internal/CaptchaService.py | 6 +----- module/plugins/internal/Container.py | 2 +- module/plugins/internal/SimpleCrypter.py | 24 ++++++++++----------- module/plugins/internal/SimpleHoster.py | 26 +++++++++++----------- module/plugins/internal/XFSAccount.py | 26 +++++++++++----------- module/plugins/internal/XFSHoster.py | 24 ++++++++++----------- 122 files changed, 590 insertions(+), 594 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 9bab183cc..bbc00083b 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -22,9 +22,9 @@ class ChipDe(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) try: - f = re.search(r'"(http://video\.chip\.de/.+)"', self.html) + f = re.search(r'"(http://video\.chip\.de/.+)"', self.data) except Exception: self.fail(_("Failed to find the URL")) diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py index 75ad74791..d1d8a2106 100644 --- a/module/plugins/crypter/CloudzillaToFolder.py +++ b/module/plugins/crypter/CloudzillaToFolder.py @@ -28,11 +28,11 @@ class CloudzillaToFolder(SimpleCrypter): def check_errors(self): - m = re.search(self.PASSWORD_PATTERN, self.html) + m = re.search(self.PASSWORD_PATTERN, self.data) if m is not None: - self.html = self.load(self.pyfile.url, get={'key': self.get_password()}) + self.data = self.load(self.pyfile.url, get={'key': self.get_password()}) - if re.search(self.PASSWORD_PATTERN, self.html): + if re.search(self.PASSWORD_PATTERN, self.data): self.retry(msg="Wrong password") diff --git a/module/plugins/crypter/DataHuFolder.py b/module/plugins/crypter/DataHuFolder.py index 233c5750a..ed517e79e 100644 --- a/module/plugins/crypter/DataHuFolder.py +++ b/module/plugins/crypter/DataHuFolder.py @@ -30,16 +30,16 @@ class DataHuFolder(SimpleCrypter): def prepare(self): super(DataHuFolder, self).prepare() - if u'K\xe9rlek add meg a jelsz\xf3t' in self.html: #: Password protected + if u'K\xe9rlek add meg a jelsz\xf3t' in self.data: #: Password protected password = self.get_password() if not password: self.fail(_("Password required")) self.log_debug("The folder is password protected', 'Using password: " + password) - self.html = self.load(self.pyfile.url, post={'mappa_pass': password}) + self.data = self.load(self.pyfile.url, post={'mappa_pass': password}) - if u'Hib\xe1s jelsz\xf3' in self.html: #: Wrong password + if u'Hib\xe1s jelsz\xf3' in self.data: #: Wrong password self.fail(_("Wrong password")) diff --git a/module/plugins/crypter/DevhostStFolder.py b/module/plugins/crypter/DevhostStFolder.py index 271ae3985..0460411d2 100644 --- a/module/plugins/crypter/DevhostStFolder.py +++ b/module/plugins/crypter/DevhostStFolder.py @@ -34,7 +34,7 @@ class DevhostStFolder(SimpleCrypter): def check_name_size(self, getinfo=True): if not self.info or getinfo: self.log_debug("File info (BEFORE): %s" % self.info) - self.info.update(self.get_info(self.pyfile.url, self.html)) + self.info.update(self.get_info(self.pyfile.url, self.data)) self.log_debug("File info (AFTER): %s" % self.info) try: @@ -42,7 +42,7 @@ class DevhostStFolder(SimpleCrypter): raise p = r'href="(.+?)">Back to \w+<' - m = re.search(p, self.html) + m = re.search(p, self.data) html = self.load(urlparse.urljoin("http://d-h.st/", m.group(1)), cookies=False) diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index f9b2a027c..9051260c2 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -35,10 +35,10 @@ class DlProtectCom(SimpleCrypter): if not re.match(r"https?://(?:www\.)?dl-protect\.com/.+", self.req.http.lastEffectiveURL): return [self.req.http.lastEffectiveURL] - post_req = {'key' : re.search(r'name="key" value="(.+?)"', self.html).group(1), + post_req = {'key' : re.search(r'name="key" value="(.+?)"', self.data).group(1), 'submitform': ""} - if "Please click on continue to see the links" in self.html: + if "Please click on continue to see the links" in self.data: post_req['submitform'] = "Continue" self.wait(2) @@ -49,22 +49,22 @@ class DlProtectCom(SimpleCrypter): post_req.update({'i' : b64time, 'submitform': "Decrypt+link"}) - if "Password :" in self.html: + if "Password :" in self.data: post_req['pwd'] = self.get_password() - if "Security Code" in self.html: - m = re.search(r'/captcha\.php\?key=(.+?)"', self.html) + if "Security Code" in self.data: + m = re.search(r'/captcha\.php\?key=(.+?)"', self.data) if m is not None: captcha_code = self.captcha.decrypt("http://www.dl-protect.com/captcha.php?key=" + m.group(1), input_type="gif") post_req['secure'] = captcha_code - self.html = self.load(self.pyfile.url, post=post_req) + self.data = self.load(self.pyfile.url, post=post_req) for errmsg in ("The password is incorrect", "The security code is incorrect"): - if errmsg in self.html: + if errmsg in self.data: self.fail(_(errmsg[1:])) - return re.findall(r'', self.html) + return re.findall(r'', self.data) getInfo = create_getInfo(DlProtectCom) diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py index b72b76d7d..96a117dd7 100644 --- a/module/plugins/crypter/EmbeduploadCom.py +++ b/module/plugins/crypter/EmbeduploadCom.py @@ -28,10 +28,10 @@ class EmbeduploadCom(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) tmp_links = [] - m = re.findall(self.LINK_PATTERN, self.html) + m = re.findall(self.LINK_PATTERN, self.data) if m is not None: prefered_set = set(self.get_config('preferedHoster').split('|')) prefered_set = map(lambda s: s.lower().split('.')[0], prefered_set) diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 0f8b494f9..2cfc6b0b2 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -48,9 +48,9 @@ class FilecryptCc(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) - if "content notfound" in self.html: #@NOTE: "content notfound" is NOT a typo + if "content notfound" in self.data: #@NOTE: "content notfound" is NOT a typo self.offline() self.handle_password_protection() @@ -77,7 +77,7 @@ class FilecryptCc(Crypter): def handle_password_protection(self): - if '\s*(.+)
', self.html, re.S) + m = re.search(r'
\s*(.+)
', self.data, re.S) if m is None: self.error(_("Unable to extract links")) links = m.group(1) diff --git a/module/plugins/crypter/Go4UpCom.py b/module/plugins/crypter/Go4UpCom.py index a2448755e..237827a1e 100755 --- a/module/plugins/crypter/Go4UpCom.py +++ b/module/plugins/crypter/Go4UpCom.py @@ -37,7 +37,7 @@ class Go4UpCom(SimpleCrypter): links = [] preference = self.get_config("preferred_hoster") - hosterslink_re = re.search(r'(/download/gethosts/.+?)"', self.html) + hosterslink_re = re.search(r'(/download/gethosts/.+?)"', self.data) if hosterslink_re: hosters = self.load(urlparse.urljoin("http://go4up.com/", hosterslink_re.group(1))) for hoster in json.loads(hosters): diff --git a/module/plugins/crypter/ImgurComAlbum.py b/module/plugins/crypter/ImgurComAlbum.py index 1cc73fa05..60569a7de 100644 --- a/module/plugins/crypter/ImgurComAlbum.py +++ b/module/plugins/crypter/ImgurComAlbum.py @@ -27,7 +27,7 @@ class ImgurComAlbum(SimpleCrypter): def get_links(self): f = lambda url: "http://" + re.sub(r'(\w{7})s\.', r'\1.', url) - return uniqify(map(f, re.findall(self.LINK_PATTERN, self.html))) + return uniqify(map(f, re.findall(self.LINK_PATTERN, self.data))) getInfo = create_getInfo(ImgurComAlbum) diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index eaa901782..ae4398914 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -44,8 +44,8 @@ class LinkCryptWs(Crypter): #: Request package self.req.http.c.setopt(pycurl.USERAGENT, "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko") #: Better chance to not get those key-captchas - self.html = self.load(self.pyfile.url) - self.html = self.load(self.pyfile.url) + self.data = self.load(self.pyfile.url) + self.data = self.load(self.pyfile.url) def decrypt(self, pyfile): @@ -91,7 +91,7 @@ class LinkCryptWs(Crypter): def is_online(self): - if "Linkcrypt.ws // Error 404" in self.html: + if "Linkcrypt.ws // Error 404" in self.data: self.log_debug("Folder doesn't exist anymore") return False else: @@ -99,7 +99,7 @@ class LinkCryptWs(Crypter): def is_password_protected(self): - if "Authorizing" in self.html: + if "Authorizing" in self.data: self.log_debug("Links are password protected") return True else: @@ -107,7 +107,7 @@ class LinkCryptWs(Crypter): def is_captcha_protected(self): - if 'id="captcha">' in self.html: + if 'id="captcha">' in self.data: self.log_debug("Links are captcha protected") return True else: @@ -115,7 +115,7 @@ class LinkCryptWs(Crypter): def is_key_captcha_protected(self): - if re.search(r'>If the folder does not open after klick on <', self.html, re.I): + if re.search(r'>If the folder does not open after klick on <', self.data, re.I): return True else: return False @@ -126,16 +126,16 @@ class LinkCryptWs(Crypter): if password: self.log_debug("Submitting password [%s] for protected links" % password) - self.html = self.load(self.pyfile.url, post={'password': password, 'x': "0", 'y': "0"}) + self.data = self.load(self.pyfile.url, post={'password': password, 'x': "0", 'y': "0"}) else: self.fail(_("Folder is password protected")) def unlock_captcha_protection(self): - captcha_url = re.search(r']*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1) + captcha_url = re.search(r']*?>.*?<\s*?input.*?src="(.+?)"', self.data, re.I | re.S).group(1) captcha_code = self.captcha.decrypt(captcha_url, input_type="gif", output_type='positional') - self.html = self.load(self.pyfile.url, post={'x': captcha_code[0], 'y': captcha_code[1]}) + self.data = self.load(self.pyfile.url, post={'x': captcha_code[0], 'y': captcha_code[1]}) def get_package_info(self): @@ -148,7 +148,7 @@ class LinkCryptWs(Crypter): def getunrarpw(self): - sitein = self.html + sitein = self.data indexi = sitein.find("|source|") + 8 indexe = sitein.find("|", indexi) @@ -165,7 +165,7 @@ class LinkCryptWs(Crypter): def handle_captcha_errors(self): - if "Your choice was wrong" in self.html: + if "Your choice was wrong" in self.data: self.retry_captcha() else: self.captcha.correct() @@ -190,7 +190,7 @@ class LinkCryptWs(Crypter): package_links = [] pattern = r'
]*?>.*?]*?value="(.+?)"[^>]*?name="file"' - ids = re.findall(pattern, self.html, re.I | re.S) + ids = re.findall(pattern, self.data, re.I | re.S) self.log_debug("Decrypting %d Web links" % len(ids)) @@ -215,7 +215,7 @@ class LinkCryptWs(Crypter): def get_container_html(self): self.container_html = [] - script = re.search(r']*?>(.*?)]*?>(.*?)([^<]+)

", self.html) + m = re.search(r"

([^<]+)

", self.data) msg = m.group(1) if m else "" self.log_info(_("Captcha protected link"), result_type, msg) captcha = self.captcha.decrypt(captcha_url, output_type=result_type) if result_type == "positional": captcha = "%d|%d" % captcha - self.html = self.load('http://linkdecrypter.com/', post={'captcha': captcha}) + self.data = self.load('http://linkdecrypter.com/', post={'captcha': captcha}) retries -= 1 - elif self.PASSWORD_PATTERN in self.html: + elif self.PASSWORD_PATTERN in self.data: if self.password: self.log_info(_("Password protected link")) - self.html = self.load('http://linkdecrypter.com/', + self.data = self.load('http://linkdecrypter.com/', post={'password': self.get_password()}) else: self.fail(_("Missing password")) else: retries -= 1 - self.html = self.load('http://linkdecrypter.com/') + self.data = self.load('http://linkdecrypter.com/') diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index 669e0ebe0..84977e293 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -37,24 +37,24 @@ class LixIn(Crypter): id = m.group('ID') self.log_debug("File id is %s" % id) - self.html = self.load(url) + self.data = self.load(url) - m = re.search(self.SUBMIT_PATTERN, self.html) + m = re.search(self.SUBMIT_PATTERN, self.data) if m is None: self.error(_("Link doesn't seem valid")) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is not None: captcharesult = self.captcha.decrypt(urlparse.urljoin("http://lix.in/", m.group(1))) - self.html = self.load(url, post={'capt': captcharesult, 'submit': "submit", 'tiny': id}) + self.data = self.load(url, post={'capt': captcharesult, 'submit': "submit", 'tiny': id}) - if re.search(self.CAPTCHA_PATTERN, self.html): + if re.search(self.CAPTCHA_PATTERN, self.data): self.fail(_("No captcha solved")) else: - self.html = self.load(url, post={'submit': "submit", 'tiny': id}) + self.data = self.load(url, post={'submit': "submit", 'tiny': id}) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.data) if m is None: self.error(_("Unable to find destination url")) else: diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py index 8e58461ad..35b7e7473 100644 --- a/module/plugins/crypter/MegaCoNzFolder.py +++ b/module/plugins/crypter/MegaCoNzFolder.py @@ -27,8 +27,8 @@ class MegaCoNzFolder(Crypter): def decrypt(self, pyfile): url = "https://mega.co.nz/#F!%s!%s" % re.match(self.__pattern__, pyfile.url).groups() - self.html = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': url}) - self.urls = re.findall(r'(https://mega(\.co)?\.nz/#N!.+?)<', self.html) + self.data = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': url}) + self.urls = re.findall(r'(https://mega(\.co)?\.nz/#N!.+?)<', self.data) getInfo = create_getInfo(MegaCoNzFolder) diff --git a/module/plugins/crypter/MultiUpOrg.py b/module/plugins/crypter/MultiUpOrg.py index 4a963d351..dc39dbe10 100644 --- a/module/plugins/crypter/MultiUpOrg.py +++ b/module/plugins/crypter/MultiUpOrg.py @@ -35,10 +35,10 @@ class MultiUpOrg(SimpleCrypter): pattern = r'style="width:97%;text-align:left".*\n.*href="(.*)"' if m_type == "download": dl_pattern = r'href="(.*)">.*\n.*
DOWNLOAD
' - mirror_page = urlparse.urljoin("http://www.multiup.org/", re.search(dl_pattern, self.html).group(1)) - self.html = self.load(mirror_page) + mirror_page = urlparse.urljoin("http://www.multiup.org/", re.search(dl_pattern, self.data).group(1)) + self.data = self.load(mirror_page) - return re.findall(pattern, self.html) + return re.findall(pattern, self.data) getInfo = create_getInfo(MultiUpOrg) diff --git a/module/plugins/crypter/MultiloadCz.py b/module/plugins/crypter/MultiloadCz.py index 58da4d982..870decbc6 100644 --- a/module/plugins/crypter/MultiloadCz.py +++ b/module/plugins/crypter/MultiloadCz.py @@ -28,14 +28,14 @@ class MultiloadCz(Crypter): def decrypt(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) if re.match(self.__pattern__, pyfile.url).group(1) == "slozka": - m = re.search(self.FOLDER_PATTERN, self.html) + m = re.search(self.FOLDER_PATTERN, self.data) if m is not None: self.urls.extend(m.group(1).split()) else: - m = re.findall(self.LINK_PATTERN, self.html) + m = re.findall(self.LINK_PATTERN, self.data) if m is not None: prefered_set = set(self.get_config('usedHoster').split('|')) self.urls.extend(x[1] for x in m if x[0] in prefered_set) diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index fb0138cd5..dfdd697f8 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -54,15 +54,15 @@ class NCryptIn(Crypter): else: #: Request folder home - self.html = self.request_folder_home() - self.cleaned_html = self.remove_html_crap(self.html) + self.data = self.request_folder_home() + self.cleaned_html = self.remove_html_crap(self.data) if not self.is_online(): self.offline() #: Check for folder protection if self.is_protected(): - self.html = self.unlock_protection() - self.cleaned_html = self.remove_html_crap(self.html) + self.data = self.unlock_protection() + self.cleaned_html = self.remove_html_crap(self.data) self.handle_errors() #: Prepare package name and folder @@ -121,7 +121,7 @@ class NCryptIn(Crypter): def get_package_info(self): - m = re.search(self.NAME_PATTERN, self.html) + m = re.search(self.NAME_PATTERN, self.data) if m is not None: name = folder = m.group('N').strip() self.log_debug("Found name [%s] and folder [%s] in package info" % (name, folder)) @@ -240,7 +240,7 @@ class NCryptIn(Crypter): package_links = [] pattern = r'/container/(rsdf|dlc|ccf)/(\w+)' - containersLinks = re.findall(pattern, self.html) + containersLinks = re.findall(pattern, self.data) self.log_debug("Decrypting %d Container links" % len(containersLinks)) for containerLink in containersLinks: link = "http://ncrypt.in/container/%s/%s.%s" % (containerLink[0], containerLink[1], containerLink[0]) @@ -252,7 +252,7 @@ class NCryptIn(Crypter): def handle_web_links(self): self.log_debug("Handling Web links") pattern = r'(http://ncrypt\.in/link-.*?=)' - links = re.findall(pattern, self.html) + links = re.findall(pattern, self.data) package_links = [] self.log_debug("Decrypting %d Web links" % len(links)) @@ -280,11 +280,11 @@ class NCryptIn(Crypter): #: Get jk jk_re = pattern % NCryptIn.JK_KEY - vjk = re.findall(jk_re, self.html) + vjk = re.findall(jk_re, self.data) #: Get crypted crypted_re = pattern % NCryptIn.CRYPTED_KEY - vcrypted = re.findall(crypted_re, self.html) + vcrypted = re.findall(crypted_re, self.data) #: Log and return self.log_debug("Detected %d crypted blocks" % len(vcrypted)) diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 21e8ab17b..453033921 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -107,24 +107,24 @@ class RelinkUs(Crypter): def request_package(self): - self.html = self.load(self.pyfile.url) + self.data = self.load(self.pyfile.url) def is_online(self): - if self.OFFLINE_TOKEN in self.html: + if self.OFFLINE_TOKEN in self.data: self.log_debug("File not found") return False return True def is_password_protected(self): - if self.PASSWORD_TOKEN in self.html: + if self.PASSWORD_TOKEN in self.data: self.log_debug("Links are password protected") return True def is_captcha_protected(self): - if self.CAPTCHA_TOKEN in self.html: + if self.CAPTCHA_TOKEN in self.data: self.log_debug("Links are captcha protected") return True return False @@ -138,7 +138,7 @@ class RelinkUs(Crypter): if password: passwd_url = self.PASSWORD_SUBMIT_URL + "?id=%s" % self.fileid passwd_data = {'id': self.fileid, 'password': password, 'pw': 'submit'} - self.html = self.load(passwd_url, post=passwd_data) + self.data = self.load(passwd_url, post=passwd_data) def unlock_captcha_protection(self): @@ -148,14 +148,14 @@ class RelinkUs(Crypter): self.log_debug("Captcha resolved, coords %s" % coords) captcha_post_url = self.CAPTCHA_SUBMIT_URL + "?id=%s" % self.fileid captcha_post_data = {'button.x': coords[0], 'button.y': coords[1], 'captcha': 'submit'} - self.html = self.load(captcha_post_url, post=captcha_post_data) + self.data = self.load(captcha_post_url, post=captcha_post_data) def get_package_info(self): name = folder = None #: Try to get info from web - m = re.search(self.FILE_TITLE_REGEX, self.html) + m = re.search(self.FILE_TITLE_REGEX, self.data) if m is not None: title = m.group(1).strip() if not self.FILE_NOTITLE in title: @@ -173,11 +173,11 @@ class RelinkUs(Crypter): def handle_errors(self): - if self.PASSWORD_ERROR_ROKEN in self.html: + if self.PASSWORD_ERROR_ROKEN in self.data: self.fail(_("Wrong password")) if self.captcha: - if self.CAPTCHA_ERROR_ROKEN in self.html: + if self.CAPTCHA_ERROR_ROKEN in self.data: self.retry_captcha() else: self.captcha.correct() @@ -197,7 +197,7 @@ class RelinkUs(Crypter): def handle_CNL2Links(self): self.log_debug("Search for CNL2 links") package_links = [] - m = re.search(self.CNL2_FORM_REGEX, self.html, re.S) + m = re.search(self.CNL2_FORM_REGEX, self.data, re.S) if m is not None: cnl2_form = m.group(1) try: @@ -214,7 +214,7 @@ class RelinkUs(Crypter): def handle_DLC_links(self): self.log_debug("Search for DLC links") package_links = [] - m = re.search(self.DLC_LINK_REGEX, self.html) + m = re.search(self.DLC_LINK_REGEX, self.data) if m is not None: container_url = self.DLC_DOWNLOAD_URL + "?id=%s&dlc=1" % self.fileid self.log_debug("Downloading DLC container link [%s]" % container_url) @@ -236,7 +236,7 @@ class RelinkUs(Crypter): self.log_debug("Search for WEB links") package_links = [] - params = re.findall(self.WEB_FORWARD_REGEX, self.html) + params = re.findall(self.WEB_FORWARD_REGEX, self.data) self.log_debug("Decrypting %d Web links" % len(params)) diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py index adacb0da6..209f27df8 100644 --- a/module/plugins/crypter/SafelinkingNet.py +++ b/module/plugins/crypter/SafelinkingNet.py @@ -42,13 +42,13 @@ class SafelinkingNet(Crypter): else: postData = {"post-protect": "1"} - self.html = self.load(url) + self.data = self.load(url) - if "link-password" in self.html: + if "link-password" in self.data: postData['link-password'] = self.get_password() - if "altcaptcha" in self.html: - m = re.search(self.SOLVEMEDIA_PATTERN, self.html) + if "altcaptcha" in self.data: + m = re.search(self.SOLVEMEDIA_PATTERN, self.data) if m is not None: captchaKey = m.group(1) captcha = SolveMedia(self) @@ -60,16 +60,16 @@ class SafelinkingNet(Crypter): postData['adcopy_challenge'] = challenge postData['adcopy_response'] = response - self.html = self.load(url, post=postData) + self.data = self.load(url, post=postData) - if "The CAPTCHA code you entered was wrong" in self.html: + if "The CAPTCHA code you entered was wrong" in self.data: self.retry_captcha() - if "The password you entered was incorrect" in self.html: + if "The password you entered was incorrect" in self.data: self.fail(_("Wrong password")) pyfile.package().password = "" - soup = BeautifulSoup.BeautifulSoup(self.html) + soup = BeautifulSoup.BeautifulSoup(self.data) scripts = soup.findAll("script") for s in scripts: if "d_links" in s.text: diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index a9deb1068..2cc279401 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -37,7 +37,7 @@ class ShareLinksBiz(Crypter): #: Request package url = self.base_url + '/' + self.file_id - self.html = self.load(url) + self.data = self.load(url) #: Unblock server (load all images) self.unblock_server() @@ -84,7 +84,7 @@ class ShareLinksBiz(Crypter): def is_online(self): - if "No usable content was found" in self.html: + if "No usable content was found" in self.data: self.log_debug("File not found") return False else: @@ -92,21 +92,21 @@ class ShareLinksBiz(Crypter): def is_password_protected(self): - if re.search(r'', self.html): + if re.search(r'', self.data): self.log_debug("Links are protected") return True return False def is_captcha_protected(self): - if '(.*)' - m = re.search(title_re, self.html, re.S) + m = re.search(title_re, self.data, re.S) if m is not None: title = m.group(1).strip() if 'unnamed' not in title: @@ -200,7 +200,7 @@ class ShareLinksBiz(Crypter): #@TODO: Gather paginated web links pattern = r'javascript:_get\(\'(.*?)\', \d+, \'\'\)' - ids = re.findall(pattern, self.html) + ids = re.findall(pattern, self.data) self.log_debug("Decrypting %d Web links" % len(ids)) for i, ID in enumerate(ids): try: @@ -234,7 +234,7 @@ class ShareLinksBiz(Crypter): self.log_debug("Handling Container links") pattern = r'javascript:_get\(\'(.*?)\', 0, \'(rsdf|ccf|dlc)\'\)' - containersLinks = re.findall(pattern, self.html) + containersLinks = re.findall(pattern, self.data) self.log_debug("Decrypting %d Container links" % len(containersLinks)) for containerLink in containersLinks: link = "%s/get/%s/%s" % (self.base_url, containerLink[1], containerLink[0]) @@ -246,7 +246,7 @@ class ShareLinksBiz(Crypter): package_links = [] self.log_debug("Handling CNL2 links") - if '/lib/cnl2/ClicknLoad.swf' in self.html: + if '/lib/cnl2/ClicknLoad.swf' in self.data: try: (crypted, jk) = self._get_cipher_params() package_links.extend(self._get_links(crypted, jk)) @@ -259,7 +259,7 @@ class ShareLinksBiz(Crypter): def _get_cipher_params(self): #: Request CNL2 - code = re.search(r'ClicknLoad.swf\?code=(.*?)"', self.html).group(1) + code = re.search(r'ClicknLoad.swf\?code=(.*?)"', self.data).group(1) url = "%s/get/cnl2/%s" % (self.base_url, code) res = self.load(url) params = res.split(";;") diff --git a/module/plugins/crypter/TnyCz.py b/module/plugins/crypter/TnyCz.py index 078b4f001..7378ec154 100644 --- a/module/plugins/crypter/TnyCz.py +++ b/module/plugins/crypter/TnyCz.py @@ -26,7 +26,7 @@ class TnyCz(SimpleCrypter): def get_links(self): - m = re.search(r'
', self.html) + m = re.search(r'', self.data) return re.findall(".+", self.load(m.group(1))) if m else None diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 5bb68b2c4..127b35bcc 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -35,7 +35,7 @@ class TusfilesNetFolder(XFSCrypter): def handle_pages(self, pyfile): - pages = re.search(self.PAGES_PATTERN, self.html) + pages = re.search(self.PAGES_PATTERN, self.data) if pages: pages = int(math.ceil(int(pages.group('pages')) / 25.0)) @@ -43,7 +43,7 @@ class TusfilesNetFolder(XFSCrypter): return for p in xrange(2, pages + 1): - self.html = self.load_page(p) + self.data = self.load_page(p) self.urls.append(self.get_links()) diff --git a/module/plugins/hoster/AndroidfilehostCom.py b/module/plugins/hoster/AndroidfilehostCom.py index 6bc318950..ae538364a 100644 --- a/module/plugins/hoster/AndroidfilehostCom.py +++ b/module/plugins/hoster/AndroidfilehostCom.py @@ -39,10 +39,10 @@ class AndroidfilehostCom(SimpleHoster): def handle_free(self, pyfile): - wait = re.search(self.WAIT_PATTERN, self.html) + wait = re.search(self.WAIT_PATTERN, self.data) self.log_debug("Waiting time: %s seconds" % wait.group(1)) - fid = re.search(r'id="fid" value="(\d+)" />', self.html).group(1) + fid = re.search(r'id="fid" value="(\d+)" />', self.data).group(1) self.log_debug("FID: %s" % fid) html = self.load("https://www.androidfilehost.com/libs/otf/mirrors.otf.php", diff --git a/module/plugins/hoster/BasketbuildCom.py b/module/plugins/hoster/BasketbuildCom.py index da4c64b56..8ee413c1a 100644 --- a/module/plugins/hoster/BasketbuildCom.py +++ b/module/plugins/hoster/BasketbuildCom.py @@ -37,8 +37,8 @@ class BasketbuildCom(SimpleHoster): def handle_free(self, pyfile): try: - link1 = re.search(r'href="(.+dlgate/.+)"', self.html).group(1) - self.html = self.load(link1) + link1 = re.search(r'href="(.+dlgate/.+)"', self.data).group(1) + self.data = self.load(link1) except AttributeError: self.error(_("Hop #1 not found")) @@ -47,7 +47,7 @@ class BasketbuildCom(SimpleHoster): self.log_debug("Next hop: %s" % link1) try: - wait = re.search(r'var sec = (\d+)', self.html).group(1) + wait = re.search(r'var sec = (\d+)', self.data).group(1) self.log_debug("Wait %s seconds" % wait) self.wait(wait) @@ -55,7 +55,7 @@ class BasketbuildCom(SimpleHoster): self.log_debug("No wait time found") try: - self.link = re.search(r'id="dlLink">\s*\s*', self.html) + m = re.search(r'', self.data) if m is None: self.error(_("Page 2 URL not found")) url = "http://bezvadata.cz%s" % m.group(1) self.log_debug("DL URL %s" % url) #: countdown - m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) + m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.data) wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 120 self.wait(wait_time, False) @@ -69,9 +69,9 @@ class BezvadataCz(SimpleHoster): def check_errors(self): - if 'images/button-download-disable.png' in self.html: + if 'images/button-download-disable.png' in self.data: self.wait(5 * 60, 24, _("Download limit reached")) #: Parallel dl limit - elif '
([^<>]+?)([^<>]+?)Zadaný ověřovací kód nesouhlasí!" in self.html: + if u"
  • Zadaný ověřovací kód nesouhlasí!
  • " in self.data: self.retry_captcha() - elif re.search(self.MULTIDL_PATTERN, self.html): + elif re.search(self.MULTIDL_PATTERN, self.data): self.wait(5 * 60, 12, _("Download limit reached")) else: self.captcha.correct() - m = re.search("countdown_number = (\d+);", self.html) + m = re.search("countdown_number = (\d+);", self.data) self.set_wait(int(m.group(1)) if m else 50) #: Download the file, destination is determined by pyLoad diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py index e133416e7..7e98be18a 100644 --- a/module/plugins/hoster/DailymotionCom.py +++ b/module/plugins/hoster/DailymotionCom.py @@ -65,7 +65,7 @@ class DailymotionCom(Hoster): streams = [] for result in re.finditer(r"\"(?Phttp:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P.*?)\\.*?)\"", - self.html): + self.data): url = result.group('URL') qf = result.group('QF') @@ -123,7 +123,7 @@ class DailymotionCom(Hoster): self.check_info(pyfile) id = re.match(self.__pattern__, pyfile.url).group('ID') - self.html = self.load("http://www.dailymotion.com/embed/video/" + id) + self.data = self.load("http://www.dailymotion.com/embed/video/" + id) streams = self.get_streams() quality = self.get_quality() diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py index 2a35efce6..808dac0e9 100644 --- a/module/plugins/hoster/DateiTo.py +++ b/module/plugins/hoster/DateiTo.py @@ -38,7 +38,7 @@ class DateiTo(SimpleHoster): for _i in xrange(3): self.log_debug("URL", url, "POST", data) - self.html = self.load(url, post=data) + self.data = self.load(url, post=data) self.check_errors() if url.endswith('download.php') and 'P' in data: @@ -48,7 +48,7 @@ class DateiTo(SimpleHoster): elif data['P'] == "IV": break - m = re.search(self.DATA_PATTERN, self.html) + m = re.search(self.DATA_PATTERN, self.data) if m is None: self.error(_("Data pattern not found")) @@ -60,11 +60,11 @@ class DateiTo(SimpleHoster): else: return - self.link = self.html + self.link = self.data def do_wait(self): - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) wait_time = int(m.group(1)) if m else 30 self.load('http://datei.to/ajax/download.php', post={'P': 'Ads'}) diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 6dd01277c..39cc548d9 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -26,20 +26,20 @@ class DebridItaliaCom(MultiHoster): def handle_premium(self, pyfile): - self.html = self.load("http://www.debriditalia.com/api.php", + self.data = self.load("http://www.debriditalia.com/api.php", get={'generate': "on", 'link': pyfile.url, 'p': self.get_password()}) - if "ERROR:" not in self.html: - self.link = self.html + if "ERROR:" not in self.data: + self.link = self.data else: - self.info['error'] = re.search(r'ERROR:(.*)', self.html).group(1).strip() + self.info['error'] = re.search(r'ERROR:(.*)', self.data).group(1).strip() - self.html = self.load("http://debriditalia.com/linkgen2.php", + self.data = self.load("http://debriditalia.com/linkgen2.php", post={'xjxfun' : "convertiLink", 'xjxargs[]': "S" % pyfile.url, 'xjxargs[]': "S%s" % self.get_password()}) try: - self.link = re.search(r'
    ' in self.html: + if '' in self.data: self.log_warning(_("Download limit reached")) self.retry(25, 60 * 60, "Download limit reached") - elif 'onClick="show_gold_offer' in self.html: + elif 'onClick="show_gold_offer' in self.data: self.account.relogin() self.retry() else: - link = re.search(self.LINK_PREMIUM_PATTERN, self.html) - mirror = re.search(self.LINK_MIRROR_PATTERN, self.html) + link = re.search(self.LINK_PREMIUM_PATTERN, self.data) + mirror = re.search(self.LINK_MIRROR_PATTERN, self.data) if link: self.link = link.group(1) diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py index 6f05aa17c..2d594397f 100644 --- a/module/plugins/hoster/EdiskCz.py +++ b/module/plugins/hoster/EdiskCz.py @@ -41,10 +41,10 @@ class EdiskCz(SimpleHoster): self.error(_("ACTION_PATTERN not found")) action = m.group(1) - self.html = self.load(url) + self.data = self.load(url) self.get_fileInfo() - self.html = self.load(re.sub("/en/download/", "/en/download-slow/", url)) + self.data = self.load(re.sub("/en/download/", "/en/download-slow/", url)) url = self.load(re.sub("/en/download/", "/x-download/", url), post={ 'action': action diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py index dacf9dcab..cc2da68ba 100644 --- a/module/plugins/hoster/EuroshareEu.py +++ b/module/plugins/hoster/EuroshareEu.py @@ -34,7 +34,7 @@ class EuroshareEu(SimpleHoster): def handle_premium(self, pyfile): - if self.ERROR_PATTERN in self.html: + if self.ERROR_PATTERN in self.data: self.account.relogin() self.retry(msg=_("User not logged in")) @@ -54,10 +54,10 @@ class EuroshareEu(SimpleHoster): def handle_free(self, pyfile): - if re.search(self.DL_LIMIT_PATTERN, self.html): + if re.search(self.DL_LIMIT_PATTERN, self.data): self.wait(5 * 60, 12, _("Download limit reached")) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py index 02468a282..0eb69ba4d 100644 --- a/module/plugins/hoster/ExtabitCom.py +++ b/module/plugins/hoster/ExtabitCom.py @@ -32,13 +32,13 @@ class ExtabitCom(SimpleHoster): def handle_free(self, pyfile): - if r">Only premium users can download this file" in self.html: + if r">Only premium users can download this file" in self.data: self.fail(_("Only premium users can download this file")) - m = re.search(r"Next free download from your ip will be available in (\d+)\s*minutes", self.html) + m = re.search(r"Next free download from your ip will be available in (\d+)\s*minutes", self.data) if m is not None: self.wait(int(m.group(1)) * 60, True) - elif "The daily downloads limit from your IP is exceeded" in self.html: + elif "The daily downloads limit from your IP is exceeded" in self.data: self.log_warning(_("You have reached your daily downloads limit for today")) self.wait(seconds_to_midnight(), True) @@ -46,7 +46,7 @@ class ExtabitCom(SimpleHoster): m = re.match(self.__pattern__, self.req.http.lastEffectiveURL) fileID = m.group('ID') if m else self.info['pattern']['ID'] - m = re.search(r'recaptcha/api/challenge\?k=(\w+)', self.html) + m = re.search(r'recaptcha/api/challenge\?k=(\w+)', self.data) if m is not None: recaptcha = ReCaptcha(self) captcha_key = m.group(1) @@ -66,9 +66,9 @@ class ExtabitCom(SimpleHoster): if not "href" in res: self.error(_("Bad JSON response")) - self.html = self.load("http://extabit.com/file/%s%s" % (fileID, res['href'])) + self.data = self.load("http://extabit.com/file/%s%s" % (fileID, res['href'])) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py index 9e7736647..cceabda53 100644 --- a/module/plugins/hoster/FastixRu.py +++ b/module/plugins/hoster/FastixRu.py @@ -28,15 +28,15 @@ class FastixRu(MultiHoster): def handle_premium(self, pyfile): - self.html = self.load("http://fastix.ru/api_v2/", + self.data = self.load("http://fastix.ru/api_v2/", get={'apikey': self.account.get_data('apikey'), 'sub' : "getdirectlink", 'link' : pyfile.url}) - data = json.loads(self.html) + data = json.loads(self.data) self.log_debug("Json data", data) - if "error\":true" in self.html: + if "error\":true" in self.data: self.offline() else: self.link = data['downloadlink'] diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index b1aeb3a2f..be6219d78 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -36,11 +36,11 @@ class FastshareCz(SimpleHoster): def check_errors(self): - if self.SLOT_ERROR in self.html: + if self.SLOT_ERROR in self.data: errmsg = self.info['error'] = _("No free slots") self.retry(12, 60, errmsg) - if self.CREDIT_ERROR in self.html: + if self.CREDIT_ERROR in self.data: errmsg = self.info['error'] = _("Not enough traffic left") self.log_warning(errmsg) self.restart(premium=False) @@ -49,7 +49,7 @@ class FastshareCz(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.FREE_URL_PATTERN, self.html) + m = re.search(self.FREE_URL_PATTERN, self.data) if m is not None: action, captcha_src = m.groups() else: diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index d6345a25b..6ea4cd634 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -50,12 +50,12 @@ class FileSharkPl(SimpleHoster): def check_errors(self): #: Check if file is now available for download (-> file name can be found in html body) - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: errmsg = self.info['error'] = _("Another download already run") self.retry(15, int(m.group(1)), errmsg) - m = re.search(self.ERROR_PATTERN, self.html) + m = re.search(self.ERROR_PATTERN, self.data) if m is not None: alert = m.group(1) @@ -75,15 +75,15 @@ class FileSharkPl(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("Download url not found")) link = urlparse.urljoin("http://fileshark.pl/", m.group(1)) - self.html = self.load(link) + self.data = self.load(link) - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: seconds = int(m.group(1)) self.log_debug("Wait %s seconds" % seconds) @@ -91,13 +91,13 @@ class FileSharkPl(SimpleHoster): action, inputs = self.parse_html_form('action=""') - m = re.search(self.TOKEN_PATTERN, self.html) + m = re.search(self.TOKEN_PATTERN, self.data) if m is None: self.retry(msg=_("Captcha form not found")) inputs['form[_token]'] = m.group(1) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is None: self.retry(msg=_("Captcha image not found")) diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py index dc709782d..7cb1ee827 100644 --- a/module/plugins/hoster/FileStoreTo.py +++ b/module/plugins/hoster/FileStoreTo.py @@ -34,7 +34,7 @@ class FileStoreTo(SimpleHoster): def handle_free(self, pyfile): self.wait(10) self.link = self.load("http://filestore.to/ajax/download.php", - get={'D': re.search(r'"D=(\w+)', self.html).group(1)}) + get={'D': re.search(r'"D=(\w+)', self.data).group(1)}) getInfo = create_getInfo(FileStoreTo) diff --git a/module/plugins/hoster/FileboomMe.py b/module/plugins/hoster/FileboomMe.py index 7472cde10..5b3087d8c 100644 --- a/module/plugins/hoster/FileboomMe.py +++ b/module/plugins/hoster/FileboomMe.py @@ -39,19 +39,19 @@ class FileboomMe(SimpleHoster): def handle_free(self, pyfile): post_url = urlparse.urljoin(pyfile.url, "file/" + self.info['pattern']['ID']) - m = re.search(r'data-slow-id="(\w+)"', self.html) + m = re.search(r'data-slow-id="(\w+)"', self.data) if m is not None: - self.html = self.load(post_url, + self.data = self.load(post_url, post={'slow_id': m.group(1)}) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.data) if m is not None: self.link = urlparse.urljoin(pyfile.url, m.group(0)) else: - m = re.search(r'', self.html) + m = re.search(r'', self.data) if m is None: - m = re.search(r'>\s*Please wait ([\d:]+)', self.html) + m = re.search(r'>\s*Please wait ([\d:]+)', self.data) if m is not None: wait_time = 0 for v in re.findall(r'(\d+)', m.group(1), re.I): @@ -62,26 +62,26 @@ class FileboomMe(SimpleHoster): else: uniqueId = m.group(1) - m = re.search(self.CAPTCHA_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.data) if m is not None: captcha = self.captcha.decrypt(urlparse.urljoin(pyfile.url, m.group(1))) - self.html = self.load(post_url, + self.data = self.load(post_url, post={'CaptchaForm[code]' : captcha, 'free' : 1, 'freeDownloadRequest': 1, 'uniqueId' : uniqueId}) - if 'The verification code is incorrect' in self.html: + if 'The verification code is incorrect' in self.data: self.retry_captcha() else: self.check_errors() - self.html = self.load(post_url, + self.data = self.load(post_url, post={'free' : 1, 'uniqueId': uniqueId}) - m = re.search(self.LINK_PATTERN, self.html) + m = re.search(self.LINK_PATTERN, self.data) if m is not None: self.link = urlparse.urljoin(pyfile.url, m.group(0)) diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py index 800e0bee2..0c0cfc124 100644 --- a/module/plugins/hoster/FilecloudIo.py +++ b/module/plugins/hoster/FilecloudIo.py @@ -49,14 +49,14 @@ class FilecloudIo(SimpleHoster): def handle_free(self, pyfile): data = {'ukey': self.info['pattern']['ID']} - m = re.search(self.AB1_PATTERN, self.html) + m = re.search(self.AB1_PATTERN, self.data) if m is None: self.error(_("__AB1")) data['__ab1'] = m.group(1) recaptcha = ReCaptcha(self) - m = re.search(self.RECAPTCHA_PATTERN, self.html) + m = re.search(self.RECAPTCHA_PATTERN, self.data) captcha_key = m.group(1) if m else recaptcha.detect_key() if captcha_key is None: @@ -93,9 +93,9 @@ class FilecloudIo(SimpleHoster): if res['dl']: - self.html = self.load('http://filecloud.io/download.html') + self.data = self.load('http://filecloud.io/download.html') - m = re.search(self.LINK_FREE_PATTERN % self.info['pattern']['ID'], self.html) + m = re.search(self.LINK_FREE_PATTERN % self.info['pattern']['ID'], self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) diff --git a/module/plugins/hoster/FiledropperCom.py b/module/plugins/hoster/FiledropperCom.py index 1a193c0f7..761b85c7a 100644 --- a/module/plugins/hoster/FiledropperCom.py +++ b/module/plugins/hoster/FiledropperCom.py @@ -31,13 +31,13 @@ class FiledropperCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search(r'img id="img" src="(.+?)"', self.html) + m = re.search(r'img id="img" src="(.+?)"', self.data) if m is None: self.fail(_("Captcha not found")) captcha_code = self.captcha.decrypt("http://www.filedropper.com/%s" % m.group(1)) - m = re.search(r'method="post" action="(.+?)"', self.html) + m = re.search(r'method="post" action="(.+?)"', self.data) if m is not None: self.download(urlparse.urljoin("http://www.filedropper.com/", m.group(1)), post={'code': captcha_code}) diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index f839eb485..a2bc84505 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -46,18 +46,18 @@ class FilefactoryCom(SimpleHoster): def handle_free(self, pyfile): - if "Currently only Premium Members can download files larger than" in self.html: + if "Currently only Premium Members can download files larger than" in self.data: self.fail(_("File too large for free download")) - elif "All free download slots on this server are currently in use" in self.html: + elif "All free download slots on this server are currently in use" in self.data: self.retry(50, 15 * 60, _("All free slots are busy")) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: return self.link = m.group(1) - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: self.wait(m.group(1)) diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index 99a8f64d8..42c2398b2 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -32,12 +32,12 @@ class FilepostCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.FLP_TOKEN_PATTERN, self.html) + m = re.search(self.FLP_TOKEN_PATTERN, self.data) if m is None: self.error(_("Token")) flp_token = m.group(1) - m = re.search(self.RECAPTCHA_PATTERN, self.html) + m = re.search(self.RECAPTCHA_PATTERN, self.data) if m is None: self.error(_("Captcha key")) captcha_key = m.group(1) @@ -52,7 +52,7 @@ class FilepostCom(SimpleHoster): post_dict = {'token': flp_token, 'code': self.info['pattern']['ID'], 'file_pass': ''} - if 'var is_pass_exists = true;' in self.html: + if 'var is_pass_exists = true;' in self.data: #: Solve password password = self.get_password() diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py index 1fa1da4b0..4bcfbe792 100644 --- a/module/plugins/hoster/FilepupNet.py +++ b/module/plugins/hoster/FilepupNet.py @@ -39,7 +39,7 @@ class FilepupNet(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is not None: dl_link = m.group(1) self.download(dl_link, post={'task': "download"}) diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index db81c3f11..a85edd2e6 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -40,7 +40,7 @@ class FilerNet(SimpleHoster): if 'token' not in inputs: self.error(_("Unable to detect token")) - self.html = self.load(pyfile.url, post={'token': inputs['token']}) + self.data = self.load(pyfile.url, post={'token': inputs['token']}) inputs = self.parse_html_form(input_names={'hash': re.compile(r'.+')})[1] if 'hash' not in inputs: diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 5b183cafb..fb2bbbf50 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -49,14 +49,14 @@ class FilesMailRu(Hoster): def process(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.url_pattern = '(.+?)' #: Marks the file as "offline" when the pattern was found on the html-page''' - if r'
    ' in self.html: + if r'
    ' in self.data: self.offline() - elif r'Page cannot be displayed' in self.html: + elif r'Page cannot be displayed' in self.data: self.offline() #: The filename that will be showed in the list (e.g. test.part1.rar)''' @@ -82,16 +82,16 @@ class FilesMailRu(Hoster): def get_file_url(self): """ - Gives you the URL to the file. Extracted from the Files.mail.ru HTML-page stored in self.html + Gives you the URL to the file. Extracted from the Files.mail.ru HTML-page stored in self.data """ - return re.search(self.url_pattern, self.html).group(0).split('')[1].split('')[0] + return re.search(self.url_pattern, self.data).group(0).split(', event)">')[1].split('')[0] def my_post_process(self): diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py index 2d797eeb3..2e60ab120 100644 --- a/module/plugins/hoster/FileserveCom.py +++ b/module/plugins/hoster/FileserveCom.py @@ -81,16 +81,16 @@ class FileserveCom(Hoster): def handle_free(self): - self.html = self.load(self.url) + self.data = self.load(self.url) action = self.load(self.url, post={'checkDownload': "check"}) action = json.loads(action) self.log_debug(action) if "fail" in action: if action['fail'] == "timeLimit": - self.html = self.load(self.url, post={'checkDownload': "showError", 'errorType': "timeLimit"}) + self.data = self.load(self.url, post={'checkDownload': "showError", 'errorType': "timeLimit"}) - self.do_long_wait(re.search(self.LONG_WAIT_PATTERN, self.html)) + self.do_long_wait(re.search(self.LONG_WAIT_PATTERN, self.data)) elif action['fail'] == "parallelDownload": self.log_warning(_("Parallel download error, now waiting 60s")) @@ -157,7 +157,7 @@ class FileserveCom(Hoster): def do_captcha(self): - captcha_key = re.search(self.CAPTCHA_KEY_PATTERN, self.html).group(1) + captcha_key = re.search(self.CAPTCHA_KEY_PATTERN, self.data).group(1) recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge(captcha_key) diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py index e63121e2d..2e5e4011d 100644 --- a/module/plugins/hoster/FourSharedCom.py +++ b/module/plugins/hoster/FourSharedCom.py @@ -38,22 +38,22 @@ class FourSharedCom(SimpleHoster): def handle_free(self, pyfile): - m = re.search(self.LINK_BTN_PATTERN, self.html) + m = re.search(self.LINK_BTN_PATTERN, self.data) if m is not None: link = m.group(1) else: link = re.sub(r'/(download|get|file|document|photo|video|audio)/', r'/get/', pyfile.url) - self.html = self.load(link) + self.data = self.load(link) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: return self.link = m.group(1) try: - m = re.search(self.ID_PATTERN, self.html) + m = re.search(self.ID_PATTERN, self.data) res = self.load('http://www.4shared.com/web/d2/getFreeDownloadLimitInfo?fileId=%s' % m.group(1)) self.log_debug(res) diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py index 53fc839ad..e32264fae 100644 --- a/module/plugins/hoster/FreakshareCom.py +++ b/module/plugins/hoster/FreakshareCom.py @@ -35,7 +35,7 @@ class FreakshareCom(Hoster): pyfile.url = pyfile.url.replace("freakshare.net/", "freakshare.com/") if self.account: - self.html = self.load(pyfile.url, cookies=False) + self.data = self.load(pyfile.url, cookies=False) pyfile.name = self.get_file_name() self.download(pyfile.url) @@ -90,14 +90,14 @@ class FreakshareCom(Hoster): def download_html(self): self.load("http://freakshare.com/index.php", {'language': "EN"}) #: Set english language in server session - self.html = self.load(self.pyfile.url) + self.data = self.load(self.pyfile.url) def get_file_url(self): """ Returns the absolute downloadable filepath """ - if not self.html: + if not self.data: self.download_html() if not self.wantReconnect: self.req_opts = self.get_download_options() #: Get the Post options for the Request @@ -108,11 +108,11 @@ class FreakshareCom(Hoster): def get_file_name(self): - if not self.html: + if not self.data: self.download_html() if not self.wantReconnect: - m = re.search(r"([^ ]+)", self.html) + m = re.search(r"([^ ]+)", self.data) if m is not None: file_name = m.group(1) else: @@ -125,11 +125,11 @@ class FreakshareCom(Hoster): def get_file_size(self): size = 0 - if not self.html: + if not self.data: self.download_html() if not self.wantReconnect: - m = re.search(r"[^ ]+ - ([^ ]+) (\w\w)yte", self.html) + m = re.search(r"[^ ]+ - ([^ ]+) (\w\w)yte", self.data) if m is not None: units = float(m.group(1).replace(",", "")) pow = {'KB': 1, 'MB': 2, 'GB': 3}[m.group(2)] @@ -139,14 +139,14 @@ class FreakshareCom(Hoster): def get_waiting_time(self): - if not self.html: + if not self.data: self.download_html() - if "Your Traffic is used up for today" in self.html: + if "Your Traffic is used up for today" in self.data: self.wantReconnect = True return seconds_to_midnight() - timestring = re.search('\s*var\s(?:downloadWait|time)\s=\s(\d*)[\d.]*;', self.html) + timestring = re.search('\s*var\s(?:downloadWait|time)\s=\s(\d*)[\d.]*;', self.data) if timestring: return int(timestring.group(1)) else: @@ -157,9 +157,9 @@ class FreakshareCom(Hoster): """ Returns True or False """ - if not self.html: + if not self.data: self.download_html() - if re.search(r"This file does not exist!", self.html): + if re.search(r"This file does not exist!", self.data): return False else: return True @@ -167,7 +167,7 @@ class FreakshareCom(Hoster): def get_download_options(self): re_envelope = re.search(r".*?value=\"Free\sDownload\".*?\n*?(.*?<.*?>\n*)*?\n*\s*?", - self.html).group(0) #: Get the whole request + self.data).group(0) #: Get the whole request to_sort = re.findall(r"", re_envelope) request_options = dict((n, v) for (v, n) in to_sort) diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py index 156a44128..698046d34 100644 --- a/module/plugins/hoster/FshareVn.py +++ b/module/plugins/hoster/FshareVn.py @@ -45,12 +45,12 @@ class FshareVn(SimpleHoster): def preload(self): - self.html = self.load("http://www.fshare.vn/check_link.php", + self.data = self.load("http://www.fshare.vn/check_link.php", post={'action': "check_link", 'arrlinks': pyfile.url}) def handle_free(self, pyfile): - self.html = self.load(pyfile.url) + self.data = self.load(pyfile.url) self.check_errors() @@ -66,22 +66,22 @@ class FshareVn(SimpleHoster): if password: self.log_info(_("Password protected link, trying ") + password) inputs['link_file_pwd_dl'] = password - self.html = self.load(url, post=inputs) + self.data = self.load(url, post=inputs) - if 'name="link_file_pwd_dl"' in self.html: + if 'name="link_file_pwd_dl"' in self.data: self.fail(_("Wrong password")) else: self.fail(_("No password found")) else: - self.html = self.load(url, post=inputs) + self.data = self.load(url, post=inputs) self.check_errors() - m = re.search(r'var count = (\d+)', self.html) + m = re.search(r'var count = (\d+)', self.data) self.set_wait(int(m.group(1)) if m else 30) - m = re.search(self.LINK_FREE_PATTERN, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.data) if m is None: self.error(_("LINK_FREE_PATTERN not found")) @@ -90,16 +90,16 @@ class FshareVn(SimpleHoster): def check_errors(self): - if '/error.php?' in self.req.lastEffectiveURL or u"Liên kết bạn chọn không tồn" in self.html: + if '/error.php?' in self.req.lastEffectiveURL or u"Liên kết bạn chọn không tồn" in self.data: self.offline() - m = re.search(self.WAIT_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.data) if m is not None: self.log_info(_("Wait until %s ICT") % m.group(1)) wait_until = time.mktime.time(time.strptime.time(m.group(1), "%d/%m/%Y %H:%M")) self.wait(wait_until - time.mktime.time(time.gmtime.time()) - 7 * 60 * 60, True) self.retry() - elif '