summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/ChipDe.py4
-rw-r--r--module/plugins/crypter/CloudzillaToFolder.py6
-rw-r--r--module/plugins/crypter/DataHuFolder.py6
-rw-r--r--module/plugins/crypter/DevhostStFolder.py4
-rw-r--r--module/plugins/crypter/DlProtectCom.py16
-rw-r--r--module/plugins/crypter/EmbeduploadCom.py4
-rw-r--r--module/plugins/crypter/FilecryptCc.py20
-rw-r--r--module/plugins/crypter/FreakhareComFolder.py2
-rw-r--r--module/plugins/crypter/FreetexthostCom.py2
-rwxr-xr-xmodule/plugins/crypter/Go4UpCom.py2
-rw-r--r--module/plugins/crypter/ImgurComAlbum.py2
-rw-r--r--module/plugins/crypter/LinkCryptWs.py26
-rw-r--r--module/plugins/crypter/LinkdecrypterCom.py16
-rw-r--r--module/plugins/crypter/LixIn.py14
-rw-r--r--module/plugins/crypter/MegaCoNzFolder.py4
-rw-r--r--module/plugins/crypter/MultiUpOrg.py6
-rw-r--r--module/plugins/crypter/MultiloadCz.py6
-rw-r--r--module/plugins/crypter/NCryptIn.py18
-rw-r--r--module/plugins/crypter/RelinkUs.py24
-rw-r--r--module/plugins/crypter/SafelinkingNet.py16
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py32
-rw-r--r--module/plugins/crypter/TnyCz.py2
-rw-r--r--module/plugins/crypter/TusfilesNetFolder.py4
-rw-r--r--module/plugins/hoster/AndroidfilehostCom.py4
-rw-r--r--module/plugins/hoster/BasketbuildCom.py8
-rw-r--r--module/plugins/hoster/BezvadataCz.py16
-rw-r--r--module/plugins/hoster/BitshareCom.py10
-rw-r--r--module/plugins/hoster/CatShareNet.py4
-rw-r--r--module/plugins/hoster/CloudzillaTo.py10
-rw-r--r--module/plugins/hoster/CrockoCom.py8
-rw-r--r--module/plugins/hoster/CzshareCom.py24
-rw-r--r--module/plugins/hoster/DailymotionCom.py4
-rw-r--r--module/plugins/hoster/DateiTo.py8
-rw-r--r--module/plugins/hoster/DebridItaliaCom.py12
-rw-r--r--module/plugins/hoster/DepositfilesCom.py20
-rw-r--r--module/plugins/hoster/EdiskCz.py4
-rw-r--r--module/plugins/hoster/EuroshareEu.py6
-rw-r--r--module/plugins/hoster/ExtabitCom.py12
-rw-r--r--module/plugins/hoster/FastixRu.py6
-rw-r--r--module/plugins/hoster/FastshareCz.py6
-rw-r--r--module/plugins/hoster/FileSharkPl.py14
-rw-r--r--module/plugins/hoster/FileStoreTo.py2
-rw-r--r--module/plugins/hoster/FileboomMe.py20
-rw-r--r--module/plugins/hoster/FilecloudIo.py8
-rw-r--r--module/plugins/hoster/FiledropperCom.py4
-rw-r--r--module/plugins/hoster/FilefactoryCom.py8
-rw-r--r--module/plugins/hoster/FilepostCom.py6
-rw-r--r--module/plugins/hoster/FilepupNet.py2
-rw-r--r--module/plugins/hoster/FilerNet.py2
-rw-r--r--module/plugins/hoster/FilesMailRu.py12
-rw-r--r--module/plugins/hoster/FileserveCom.py8
-rw-r--r--module/plugins/hoster/FourSharedCom.py8
-rw-r--r--module/plugins/hoster/FreakshareCom.py26
-rw-r--r--module/plugins/hoster/FshareVn.py20
-rw-r--r--module/plugins/hoster/GamefrontCom.py2
-rw-r--r--module/plugins/hoster/GoogledriveCom.py4
-rw-r--r--module/plugins/hoster/HighWayMe.py22
-rw-r--r--module/plugins/hoster/HostujeNet.py2
-rw-r--r--module/plugins/hoster/IfolderRu.py10
-rw-r--r--module/plugins/hoster/Keep2ShareCc.py24
-rw-r--r--module/plugins/hoster/KingfilesNet.py8
-rw-r--r--module/plugins/hoster/LetitbitNet.py6
-rw-r--r--module/plugins/hoster/LoadTo.py4
-rw-r--r--module/plugins/hoster/LolabitsEs.py8
-rw-r--r--module/plugins/hoster/MediafireCom.py10
-rw-r--r--module/plugins/hoster/MegaRapidCz.py6
-rw-r--r--module/plugins/hoster/MegaRapidoNet.py4
-rw-r--r--module/plugins/hoster/MegasharesCom.py14
-rw-r--r--module/plugins/hoster/MultishareCz.py2
-rw-r--r--module/plugins/hoster/MyfastfileCom.py10
-rw-r--r--module/plugins/hoster/MystoreTo.py2
-rw-r--r--module/plugins/hoster/MyvideoDe.py8
-rw-r--r--module/plugins/hoster/NarodRu.py10
-rw-r--r--module/plugins/hoster/NitroflareCom.py4
-rw-r--r--module/plugins/hoster/NosuploadCom.py8
-rw-r--r--module/plugins/hoster/NowDownloadSx.py12
-rw-r--r--module/plugins/hoster/NowVideoSx.py4
-rw-r--r--module/plugins/hoster/OboomCom.py2
-rw-r--r--module/plugins/hoster/PornhostCom.py26
-rw-r--r--module/plugins/hoster/PornhubCom.py14
-rw-r--r--module/plugins/hoster/PromptfileCom.py4
-rw-r--r--module/plugins/hoster/QuickshareCz.py4
-rw-r--r--module/plugins/hoster/RapidgatorNet.py10
-rw-r--r--module/plugins/hoster/RedtubeCom.py14
-rw-r--r--module/plugins/hoster/RemixshareCom.py4
-rw-r--r--module/plugins/hoster/SendspaceCom.py10
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py6
-rw-r--r--module/plugins/hoster/ShareplaceCom.py16
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py24
-rw-r--r--module/plugins/hoster/SimplydebridCom.py6
-rw-r--r--module/plugins/hoster/SizedriveCom.py4
-rw-r--r--module/plugins/hoster/SoundcloudCom.py4
-rw-r--r--module/plugins/hoster/SpeedyshareCom.py2
-rw-r--r--module/plugins/hoster/StreamCz.py8
-rw-r--r--module/plugins/hoster/TurbobitNet.py16
-rw-r--r--module/plugins/hoster/UlozTo.py16
-rw-r--r--module/plugins/hoster/UloziskoSk.py10
-rw-r--r--module/plugins/hoster/UnibytesCom.py8
-rw-r--r--module/plugins/hoster/UpleaCom.py8
-rw-r--r--module/plugins/hoster/UploadedTo.py4
-rw-r--r--module/plugins/hoster/UploadheroCom.py12
-rw-r--r--module/plugins/hoster/UploadingCom.py12
-rw-r--r--module/plugins/hoster/UpstoreNet.py10
-rw-r--r--module/plugins/hoster/UserscloudCom.py2
-rw-r--r--module/plugins/hoster/VeehdCom.py14
-rw-r--r--module/plugins/hoster/VeohCom.py2
-rw-r--r--module/plugins/hoster/VimeoCom.py2
-rw-r--r--module/plugins/hoster/VkCom.py2
-rw-r--r--module/plugins/hoster/WrzucTo.py6
-rw-r--r--module/plugins/hoster/XHamsterCom.py20
-rw-r--r--module/plugins/hoster/YadiSk.py4
-rw-r--r--module/plugins/hoster/YibaishiwuCom.py2
-rw-r--r--module/plugins/hoster/YoupornCom.py14
-rw-r--r--module/plugins/hoster/YourfilesTo.py16
-rw-r--r--module/plugins/hoster/ZippyshareCom.py4
-rw-r--r--module/plugins/internal/Base.py12
-rw-r--r--module/plugins/internal/CaptchaService.py6
-rw-r--r--module/plugins/internal/Container.py2
-rw-r--r--module/plugins/internal/SimpleCrypter.py24
-rw-r--r--module/plugins/internal/SimpleHoster.py26
-rw-r--r--module/plugins/internal/XFSAccount.py26
-rw-r--r--module/plugins/internal/XFSHoster.py24
122 files changed, 590 insertions, 594 deletions
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'<a href="([^/].+?)" target="_blank">', self.html)
+ return re.findall(r'<a href="([^/].+?)" target="_blank">', 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 '<input type="text" name="password"' not in self.html:
+ if '<input type="text" name="password"' not in self.data:
return
self.log_info(_("Folder is password protected"))
@@ -87,15 +87,15 @@ class FilecryptCc(Crypter):
if not password:
self.fail(_("Please enter the password in package section and try again"))
- self.html = self.load(self.pyfile.url, post={'password': password})
+ self.data = self.load(self.pyfile.url, post={'password': password})
def handle_captcha(self):
- if re.search(self.CAPTCHA_PATTERN, self.html):
- m1 = re.search(self.INTERNAL_CAPTCHA_PATTERN, self.html)
- m2 = re.search(self.CIRCLE_CAPTCHA_PATTERN, self.html)
- m3 = re.search(self.SOLVE_MEDIA_PATTERN, self.html)
- m4 = re.search(self.KEY_CAPTCHA_PATTERN, self.html)
+ if re.search(self.CAPTCHA_PATTERN, self.data):
+ m1 = re.search(self.INTERNAL_CAPTCHA_PATTERN, self.data)
+ m2 = re.search(self.CIRCLE_CAPTCHA_PATTERN, self.data)
+ m3 = re.search(self.SOLVE_MEDIA_PATTERN, self.data)
+ m4 = re.search(self.KEY_CAPTCHA_PATTERN, self.data)
if m1: #: Normal captcha
self.log_debug("Internal Captcha URL: %s" % urlparse.urljoin(self.pyfile.url, m1.group(1)))
@@ -154,7 +154,7 @@ class FilecryptCc(Crypter):
else:
self.log_info(_("No captcha found"))
- self.site_with_links = self.html
+ self.site_with_links = self.data
diff --git a/module/plugins/crypter/FreakhareComFolder.py b/module/plugins/crypter/FreakhareComFolder.py
index 8f839bad0..615bcd4ba 100644
--- a/module/plugins/crypter/FreakhareComFolder.py
+++ b/module/plugins/crypter/FreakhareComFolder.py
@@ -29,7 +29,7 @@ class FreakhareComFolder(SimpleCrypter):
def load_page(self, page_n):
if not hasattr(self, 'f_id') and not hasattr(self, 'f_md5'):
- m = re.search(r'http://freakshare.com/\?x=folder&f_id=(\d+)&f_md5=(\w+)', self.html)
+ m = re.search(r'http://freakshare.com/\?x=folder&f_id=(\d+)&f_md5=(\w+)', self.data)
if m is not None:
self.f_id = m.group(1)
self.f_md5 = m.group(2)
diff --git a/module/plugins/crypter/FreetexthostCom.py b/module/plugins/crypter/FreetexthostCom.py
index e959be93f..a967f81d4 100644
--- a/module/plugins/crypter/FreetexthostCom.py
+++ b/module/plugins/crypter/FreetexthostCom.py
@@ -23,7 +23,7 @@ class FreetexthostCom(SimpleCrypter):
def get_links(self):
- m = re.search(r'<div id="contentsinner">\s*(.+)<div class="viewcount">', self.html, re.S)
+ m = re.search(r'<div id="contentsinner">\s*(.+)<div class="viewcount">', 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 "<title>Linkcrypt.ws // Error 404</title>" in self.html:
+ if "<title>Linkcrypt.ws // Error 404</title>" 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'<form.*?id\s*?=\s*?"captcha"[^>]*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1)
+ captcha_url = re.search(r'<form.*?id\s*?=\s*?"captcha"[^>]*?>.*?<\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'<form action="http://linkcrypt.ws/out.html"[^>]*?>.*?<input[^>]*?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'<div.*?id="ad_cont".*?<script.*?javascrip[^>]*?>(.*?)</script', self.html, re.I | re.S)
+ script = re.search(r'<div.*?id="ad_cont".*?<script.*?javascrip[^>]*?>(.*?)</script', self.data, re.I | re.S)
if script:
container_html_text = script.group(1)
diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py
index 2d2ace5a7..98e200982 100644
--- a/module/plugins/crypter/LinkdecrypterCom.py
+++ b/module/plugins/crypter/LinkdecrypterCom.py
@@ -36,36 +36,36 @@ class LinkdecrypterCom(MultiCrypter):
retries = 5
post_dict = {'link_cache': "on", 'pro_links': pyfile.url, 'modo_links': "text"}
- self.html = self.load('http://linkdecrypter.com/', post=post_dict)
+ self.data = self.load('http://linkdecrypter.com/', post=post_dict)
while retries:
- m = re.search(self.TEXTAREA_PATTERN, self.html, re.S)
+ m = re.search(self.TEXTAREA_PATTERN, self.data, re.S)
if m is not None:
self.urls = [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x]
- m = re.search(self.CAPTCHA_PATTERN, self.html)
+ m = re.search(self.CAPTCHA_PATTERN, self.data)
if m is not None:
captcha_url = 'http://linkdecrypter.com/' + m.group(1)
result_type = "positional" if "getPos" in m.group(2) else "textual"
- m = re.search(r"<p><i><b>([^<]+)</b></i></p>", self.html)
+ m = re.search(r"<p><i><b>([^<]+)</b></i></p>", 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.*<h5>DOWNLOAD</h5>'
- 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'<form.*?id="passwordForm".*?>', self.html):
+ if re.search(r'<form.*?id="passwordForm".*?>', self.data):
self.log_debug("Links are protected")
return True
return False
def is_captcha_protected(self):
- if '<map id="captchamap"' in self.html:
+ if '<map id="captchamap"' in self.data:
self.log_debug("Links are captcha protected")
return True
return False
def unblock_server(self):
- imgs = re.findall(r"(/template/images/.*?\.gif)", self.html)
+ imgs = re.findall(r"(/template/images/.*?\.gif)", self.data)
for img in imgs:
self.load(self.base_url + img)
@@ -116,7 +116,7 @@ class ShareLinksBiz(Crypter):
self.log_debug("Submitting password [%s] for protected links" % password)
post = {'password': password, 'login': 'Submit form'}
url = self.base_url + '/' + self.file_id
- self.html = self.load(url, post=post)
+ self.data = self.load(url, post=post)
def unlock_captcha_protection(self):
@@ -125,7 +125,7 @@ class ShareLinksBiz(Crypter):
self.log_debug("Captcha map with [%d] positions" % len(captchaMap.keys()))
#: Request user for captcha coords
- m = re.search(r'<img src="/captcha.gif\?d=(.+?)&PHPSESSID=(.+?)&legend=1"', self.html)
+ m = re.search(r'<img src="/captcha.gif\?d=(.+?)&PHPSESSID=(.+?)&legend=1"', self.data)
if m is None:
self.log_debug("Captcha url data not found, maybe plugin out of date?")
self.fail(_("Captcha url data not found"))
@@ -141,12 +141,12 @@ class ShareLinksBiz(Crypter):
self.retry_captcha(wait=5)
url = self.base_url + href
- self.html = self.load(url)
+ self.data = self.load(url)
def _get_captcha_map(self):
mapp = {}
- for m in re.finditer(r'<area shape="rect" coords="(.*?)" href="(.*?)"', self.html):
+ for m in re.finditer(r'<area shape="rect" coords="(.*?)" href="(.*?)"', self.data):
rect = eval('(' + m.group(1) + ')')
href = m.group(2)
mapp[rect] = href
@@ -162,11 +162,11 @@ class ShareLinksBiz(Crypter):
def handle_errors(self):
- if "The inserted password was wrong" in self.html:
+ if "The inserted password was wrong" in self.data:
self.fail(_("Wrong password"))
if self.captcha:
- if "Your choice was wrong" in self.html:
+ if "Your choice was wrong" in self.data:
self.retry_captcha(wait=5)
else:
self.captcha.correct()
@@ -177,7 +177,7 @@ class ShareLinksBiz(Crypter):
#: Extract from web package header
title_re = r'<h2><img.*?/>(.*)</h2>'
- 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'<a id=\'save_paste\' href="(.+save\.php\?hash=.+)">', self.html)
+ m = re.search(r'<a id=\'save_paste\' href="(.+save\.php\?hash=.+)">', 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*<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("&amp;", "&").replace("/", "") + '.flv'
+ return re.search(file_name_pattern, self.data).group(1).replace("&amp;", "&").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
diff --git a/module/plugins/internal/Base.py b/module/plugins/internal/Base.py
index 48b4ff237..84986bd09 100644
--- a/module/plugins/internal/Base.py
+++ b/module/plugins/internal/Base.py
@@ -101,7 +101,7 @@ class Base(Plugin):
self.captcha = Captcha(self)
#: Some plugins store html code here
- self.html = None
+ self.data = ""
#: Dict of the amount of retries already made
self.retries = {}
@@ -137,9 +137,9 @@ class Base(Plugin):
def _setup(self):
#@TODO: Remove in 0.4.10
- self.html = ""
- self.pyfile.error = ""
- self.last_html = None
+ self.data = ""
+ self.pyfile.error = ""
+ self.last_html = None
if self.get_config('use_premium', True):
self.load_account() #@TODO: Move to PluginThread in 0.4.10
@@ -221,7 +221,7 @@ class Base(Plugin):
self.log_info(_("Grabbing link info..."))
old_info = dict(self.info)
- new_info = self.get_info(self.pyfile.url, self.html)
+ new_info = self.get_info(self.pyfile.url, self.data)
self.info.update(new_info)
@@ -491,7 +491,7 @@ class Base(Plugin):
def parse_html_form(self, attr_str="", input_names={}):
- return parse_html_form(attr_str, self.html, input_names)
+ return parse_html_form(attr_str, self.data, input_names)
def get_password(self):
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index 353ac4e13..b3f7841f0 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -26,12 +26,8 @@ class CaptchaService(Captcha):
self.fail(_("%s key not found") % self.__name__)
- #@TODO: Recheck in 0.4.10, html is now pyfile.data
def retrieve_data(self):
- if hasattr(self.plugin, "html") and self.plugin.html:
- return self.plugin.html
- else:
- self.fail(_("%s data not found") % self.__name__)
+ return self.plugin.data or self.plugin.last_html or ""
def detect_key(self, data=None):
diff --git a/module/plugins/internal/Container.py b/module/plugins/internal/Container.py
index b96e6e9b0..16b2df2a8 100644
--- a/module/plugins/internal/Container.py
+++ b/module/plugins/internal/Container.py
@@ -68,7 +68,7 @@ class Container(Crypter):
else:
self.fail(_("File not exists"))
else:
- self.data = self.pyfile.url
+ self.data = self.pyfile.url #@NOTE: ???
def delete_tmp(self):
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 51b104381..89dc9b1a2 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -170,7 +170,7 @@ class SimpleCrypter(Crypter):
def preload(self):
- self.html = self.load(self.pyfile.url,
+ self.data = self.load(self.pyfile.url,
cookies=self.COOKIES,
ref=False,
decode=self.TEXT_ENCODING)
@@ -228,7 +228,7 @@ class SimpleCrypter(Crypter):
if not self.LINK_FREE_PATTERN:
self.log_warning(_("Free decrypting not implemented"))
- links = re.findall(self.LINK_FREE_PATTERN, self.html)
+ links = re.findall(self.LINK_FREE_PATTERN, self.data)
if not links:
self.error(_("Free decrypted link not found"))
else:
@@ -240,7 +240,7 @@ class SimpleCrypter(Crypter):
self.log_warning(_("Premium decrypting not implemented"))
self.restart(premium=False)
- links = re.findall(self.LINK_PREMIUM_PATTERN, self.html)
+ links = re.findall(self.LINK_PREMIUM_PATTERN, self.data)
if not links:
self.error(_("Premium decrypted link found"))
else:
@@ -249,7 +249,7 @@ class SimpleCrypter(Crypter):
def get_links(self):
"""
- Returns the links extracted from self.html
+ Returns the links extracted from self.data
You should override this only if it's impossible to extract links using only the LINK_PATTERN.
"""
if self.premium:
@@ -269,33 +269,33 @@ class SimpleCrypter(Crypter):
def handle_pages(self, pyfile):
try:
- pages = int(re.search(self.PAGES_PATTERN, self.html).group(1))
+ pages = int(re.search(self.PAGES_PATTERN, self.data).group(1))
except Exception:
pages = 1
for p in xrange(2, pages + 1):
- self.html = self.load_page(p)
+ self.data = self.load_page(p)
self.urls.extend(self.get_links())
def check_errors(self):
- if not self.html:
+ if not self.data:
self.log_debug("No data to check")
return
- if self.IP_BLOCKED_PATTERN and re.search(self.IP_BLOCKED_PATTERN, self.html):
+ if self.IP_BLOCKED_PATTERN and re.search(self.IP_BLOCKED_PATTERN, self.data):
self.fail(_("Connection from your current IP address is not allowed"))
elif not self.premium:
- if self.PREMIUM_ONLY_PATTERN and re.search(self.PREMIUM_ONLY_PATTERN, self.html):
+ if self.PREMIUM_ONLY_PATTERN and re.search(self.PREMIUM_ONLY_PATTERN, self.data):
self.fail(_("Link can be decrypted by premium users only"))
- elif self.SIZE_LIMIT_PATTERN and re.search(self.SIZE_LIMIT_PATTERN, self.html):
+ elif self.SIZE_LIMIT_PATTERN and re.search(self.SIZE_LIMIT_PATTERN, self.data):
self.fail(_("Link list too large for free decrypt"))
if self.ERROR_PATTERN:
- m = re.search(self.ERROR_PATTERN, self.html)
+ m = re.search(self.ERROR_PATTERN, self.data)
if m is not None:
try:
errmsg = m.group(1)
@@ -343,7 +343,7 @@ class SimpleCrypter(Crypter):
self.restart(errmsg)
elif self.WAIT_PATTERN:
- m = re.search(self.WAIT_PATTERN, self.html)
+ m = re.search(self.WAIT_PATTERN, self.data)
if m is not None:
try:
waitmsg = m.group(1).strip()
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index ce810deb4..f53b80a0a 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -238,7 +238,7 @@ class SimpleHoster(Hoster):
def preload(self):
- self.html = self.load(self.pyfile.url,
+ self.data = self.load(self.pyfile.url,
cookies=self.COOKIES,
ref=False,
decode=self.TEXT_ENCODING)
@@ -310,28 +310,28 @@ class SimpleHoster(Hoster):
self.log_debug("Performing custom check rules...")
with open(encode(self.last_download), "rb") as f:
- self.html = f.read(1048576) #@TODO: Recheck in 0.4.10
+ self.data = f.read(1048576) #@TODO: Recheck in 0.4.10
self.check_errors()
def check_errors(self):
- if not self.html:
+ if not self.data:
self.log_debug("No data to check")
return
- if self.IP_BLOCKED_PATTERN and re.search(self.IP_BLOCKED_PATTERN, self.html):
+ if self.IP_BLOCKED_PATTERN and re.search(self.IP_BLOCKED_PATTERN, self.data):
self.fail(_("Connection from your current IP address is not allowed"))
elif not self.premium:
- if self.PREMIUM_ONLY_PATTERN and re.search(self.PREMIUM_ONLY_PATTERN, self.html):
+ if self.PREMIUM_ONLY_PATTERN and re.search(self.PREMIUM_ONLY_PATTERN, self.data):
self.fail(_("File can be downloaded by premium users only"))
- elif self.SIZE_LIMIT_PATTERN and re.search(self.SIZE_LIMIT_PATTERN, self.html):
+ elif self.SIZE_LIMIT_PATTERN and re.search(self.SIZE_LIMIT_PATTERN, self.data):
self.fail(_("File too large for free download"))
- elif self.DL_LIMIT_PATTERN and re.search(self.DL_LIMIT_PATTERN, self.html):
- m = re.search(self.DL_LIMIT_PATTERN, self.html)
+ elif self.DL_LIMIT_PATTERN and re.search(self.DL_LIMIT_PATTERN, self.data):
+ m = re.search(self.DL_LIMIT_PATTERN, self.data)
try:
errmsg = m.group(1)
@@ -348,11 +348,11 @@ class SimpleHoster(Hoster):
self.wait(wait_time, reconnect=wait_time > self.get_config("max_wait", 10) * 60)
self.restart(_("Download limit exceeded"))
- if self.HAPPY_HOUR_PATTERN and re.search(self.HAPPY_HOUR_PATTERN, self.html):
+ if self.HAPPY_HOUR_PATTERN and re.search(self.HAPPY_HOUR_PATTERN, self.data):
self.multiDL = True
if self.ERROR_PATTERN:
- m = re.search(self.ERROR_PATTERN, self.html)
+ m = re.search(self.ERROR_PATTERN, self.data)
if m is not None:
try:
errmsg = m.group(1).strip()
@@ -400,7 +400,7 @@ class SimpleHoster(Hoster):
self.restart(errmsg)
elif self.WAIT_PATTERN:
- m = re.search(self.WAIT_PATTERN, self.html)
+ m = re.search(self.WAIT_PATTERN, self.data)
if m is not None:
try:
waitmsg = m.group(1).strip()
@@ -433,7 +433,7 @@ class SimpleHoster(Hoster):
if not self.LINK_FREE_PATTERN:
self.log_warning(_("Free download not implemented"))
- 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"))
else:
@@ -445,7 +445,7 @@ class SimpleHoster(Hoster):
self.log_warning(_("Premium download not implemented"))
self.restart(premium=False)
- m = re.search(self.LINK_PREMIUM_PATTERN, self.html)
+ m = re.search(self.LINK_PREMIUM_PATTERN, self.data)
if m is None:
self.error(_("Premium download link not found"))
else:
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index 02d94b9a3..3e9003577 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -82,13 +82,13 @@ class XFSAccount(MultiAccount):
if not self.PLUGIN_URL: #@TODO: Remove in 0.4.10
return
- self.html = self.load(self.PLUGIN_URL,
+ self.data = self.load(self.PLUGIN_URL,
get={'op': "my_account"},
cookies=self.COOKIES)
- premium = True if re.search(self.PREMIUM_PATTERN, self.html) else False
+ premium = True if re.search(self.PREMIUM_PATTERN, self.data) else False
- m = re.search(self.VALID_UNTIL_PATTERN, self.html)
+ m = re.search(self.VALID_UNTIL_PATTERN, self.data)
if m is not None:
expiredate = m.group(1).strip()
self.log_debug("Expire date: " + expiredate)
@@ -111,7 +111,7 @@ class XFSAccount(MultiAccount):
else:
self.log_debug("VALID UNTIL PATTERN not found")
- m = re.search(self.TRAFFIC_LEFT_PATTERN, self.html)
+ m = re.search(self.TRAFFIC_LEFT_PATTERN, self.data)
if m is not None:
try:
traffic = m.groupdict()
@@ -139,7 +139,7 @@ class XFSAccount(MultiAccount):
else:
self.log_debug("TRAFFIC LEFT PATTERN not found")
- leech = [m.groupdict() for m in re.finditer(self.LEECH_TRAFFIC_PATTERN, self.html)]
+ leech = [m.groupdict() for m in re.finditer(self.LEECH_TRAFFIC_PATTERN, self.data)]
if leech:
leechtraffic = 0
try:
@@ -173,12 +173,12 @@ class XFSAccount(MultiAccount):
def signin(self, user, password, data):
- self.html = self.load(self.LOGIN_URL, cookies=self.COOKIES)
+ self.data = self.load(self.LOGIN_URL, cookies=self.COOKIES)
- if re.search(self.LOGIN_SKIP_PATTERN, self.html):
+ if re.search(self.LOGIN_SKIP_PATTERN, self.data):
self.skip_login()
- action, inputs = parse_html_form('name="FL"', self.html)
+ action, inputs = parse_html_form('name="FL"', self.data)
if not inputs:
inputs = {'op' : "login",
'redirect': self.PLUGIN_URL}
@@ -191,17 +191,17 @@ class XFSAccount(MultiAccount):
else:
url = self.LOGIN_URL
- self.html = self.load(url, post=inputs, cookies=self.COOKIES)
+ self.data = self.load(url, post=inputs, cookies=self.COOKIES)
self.check_errors()
def check_errors(self):
- if not self.html:
- self.log_warning(_("No html code to check"))
+ if not self.data:
+ self.log_debug("No data to check")
return
- m = re.search(self.LOGIN_BAN_PATTERN, self.html)
+ m = re.search(self.LOGIN_BAN_PATTERN, self.data)
if m is not None:
try:
errmsg = m.group(1)
@@ -218,7 +218,7 @@ class XFSAccount(MultiAccount):
self.fail_login(errmsg)
- m = re.search(self.LOGIN_FAIL_PATTERN, self.html)
+ m = re.search(self.LOGIN_FAIL_PATTERN, self.data)
if m is not None:
try:
errmsg = m.group(1)
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index 37afdbce0..971b92b64 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -92,19 +92,19 @@ class XFSHoster(SimpleHoster):
self.check_errors()
- m = re.search(self.LINK_PATTERN, self.html, re.S)
+ m = re.search(self.LINK_PATTERN, self.data, re.S)
if m is not None:
break
data = self._post_parameters()
- self.html = self.load(pyfile.url, post=data, redirect=False)
+ self.data = self.load(pyfile.url, post=data, redirect=False)
m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I)
if m and not "op=" in m.group(1):
break
- m = re.search(self.LINK_PATTERN, self.html, re.S)
+ m = re.search(self.LINK_PATTERN, self.data, re.S)
if m is not None:
break
else:
@@ -123,7 +123,7 @@ class XFSHoster(SimpleHoster):
self.fail(_("Only registered or premium users can use url leech feature"))
#: Only tested with easybytez.com
- self.html = self.load("http://www.%s/" % self.PLUGIN_DOMAIN)
+ self.data = self.load("http://www.%s/" % self.PLUGIN_DOMAIN)
action, inputs = self.parse_html_form()
@@ -138,7 +138,7 @@ class XFSHoster(SimpleHoster):
self.req.setOption("timeout", 600) #: Wait for file to upload to easybytez.com
- self.html = self.load(action, post=inputs)
+ self.data = self.load(action, post=inputs)
self.check_errors()
@@ -151,7 +151,7 @@ class XFSHoster(SimpleHoster):
stmsg = inputs['st']
if stmsg == 'OK':
- self.html = self.load(action, post=inputs)
+ self.data = self.load(action, post=inputs)
elif 'Can not leech file' in stmsg:
self.retry(20, 3 * 60, _("Can not leech file"))
@@ -163,7 +163,7 @@ class XFSHoster(SimpleHoster):
self.fail(stmsg)
#: Get easybytez.com link for uploaded file
- m = re.search(self.LINK_LEECH_PATTERN, self.html)
+ m = re.search(self.LINK_LEECH_PATTERN, self.data)
if m is None:
self.error(_("LINK_LEECH_PATTERN not found"))
@@ -195,7 +195,7 @@ class XFSHoster(SimpleHoster):
self.fail(_("Missing password"))
if not self.premium:
- m = re.search(self.WAIT_PATTERN, self.html)
+ m = re.search(self.WAIT_PATTERN, self.data)
if m is not None:
wait_time = int(m.group(1))
self.set_wait(wait_time)
@@ -216,13 +216,13 @@ class XFSHoster(SimpleHoster):
def handle_captcha(self, inputs):
- m = re.search(self.CAPTCHA_PATTERN, self.html)
+ m = re.search(self.CAPTCHA_PATTERN, self.data)
if m is not None:
captcha_url = m.group(1)
inputs['code'] = self.captcha.decrypt(captcha_url)
return
- m = re.search(self.CAPTCHA_BLOCK_PATTERN, self.html, re.S)
+ m = re.search(self.CAPTCHA_BLOCK_PATTERN, self.data, re.S)
if m is not None:
captcha_div = m.group(1)
numerals = re.findall(r'<span.*?padding-left\s*:\s*(\d+).*?>(\d)</span>', html_unescape(captcha_div))
@@ -236,7 +236,7 @@ class XFSHoster(SimpleHoster):
recaptcha = ReCaptcha(self)
try:
- captcha_key = re.search(self.RECAPTCHA_PATTERN, self.html).group(1)
+ captcha_key = re.search(self.RECAPTCHA_PATTERN, self.data).group(1)
except Exception:
captcha_key = recaptcha.detect_key()
@@ -250,7 +250,7 @@ class XFSHoster(SimpleHoster):
solvemedia = SolveMedia(self)
try:
- captcha_key = re.search(self.SOLVEMEDIA_PATTERN, self.html).group(1)
+ captcha_key = re.search(self.SOLVEMEDIA_PATTERN, self.data).group(1)
except Exception:
captcha_key = solvemedia.detect_key()