diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2012-04-11 00:40:29 +0200 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2012-04-11 00:40:29 +0200 |
commit | 5ce7835dc10327b62e642d4fab48061ade0ae0c0 (patch) | |
tree | 9fbd7ec70e23187981ea589620e34fd83aa16c1a /module/plugins/hoster/LetitbitNet.py | |
parent | version bump (diff) | |
download | pyload-5ce7835dc10327b62e642d4fab48061ade0ae0c0.tar.xz |
update letitbit, depositfiles, ul.to; add trailerzone crypter by godofdream
closed #570
Diffstat (limited to 'module/plugins/hoster/LetitbitNet.py')
-rw-r--r-- | module/plugins/hoster/LetitbitNet.py | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py index aed35e71b..003502f75 100644 --- a/module/plugins/hoster/LetitbitNet.py +++ b/module/plugins/hoster/LetitbitNet.py @@ -25,7 +25,7 @@ class LetitbitNet(SimpleHoster): __name__ = "LetitbitNet" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*letitbit.net/download/.*" - __version__ = "0.15" + __version__ = "0.17" __description__ = """letitbit.net""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -33,8 +33,10 @@ class LetitbitNet(SimpleHoster): CHECK_URL_PATTERN = r"ajax_check_url\s*=\s*'((http://[^/]+)[^']+)';" SECONDS_PATTERN = r"seconds\s*=\s*(\d+);" - FILE_INFO_PATTERN = r'<h1[^>]*>File: <a[^>]*><span>(?P<N>[^<]+)</span></a>\s*\[<span>(?P<S>[^<]+)</span>]</h1>' + FILE_INFO_PATTERN = r'<h1[^>]*>File:.*?<span>(?P<N>[^<]+)</span>.*?\[<span>(?P<S>[^<]+)</span>]</h1>' FILE_OFFLINE_PATTERN = r'>File not found<' + + DOMAIN = "http://letitbit.net" def handleFree(self): action, inputs = self.parseHtmlForm('id="ifree_form"') @@ -43,8 +45,9 @@ class LetitbitNet(SimpleHoster): #self.logDebug(action, inputs) inputs['desc'] = "" - self.html = self.load("http://letitbit.net" + action, post = inputs, cookies = True) - + self.html = self.load(self.DOMAIN + action, post = inputs, cookies = True) + + """ action, inputs = self.parseHtmlForm('id="d3_form"') if not action: self.parseError("page 2 / d3_form") #self.logDebug(action, inputs) @@ -60,13 +63,19 @@ class LetitbitNet(SimpleHoster): except Exception, e: self.logError(e) self.parseError("page 3 / js") - - response = self.load(ajax_check_url, post = inputs, cookies = True) + """ + + found = re.search(self.SECONDS_PATTERN, self.html) + seconds = int(found.group(1)) if found else 60 + self.setWait(seconds+1) + self.wait() + + response = self.load("%s/ajax/download3.php" % self.DOMAIN, post = " ", cookies = True) if response != '1': self.parseError('Unknown response - ajax_check_url') for i in range(5): - captcha = self.decryptCaptcha('%s/captcha_new.php?rand=%d' % (captcha_url, random() * 100000), cookies = True) - response = self.load(captcha_url + '/ajax/check_captcha.php', post = {"code": captcha}, cookies = True) + captcha = self.decryptCaptcha('%s/captcha_new.php?rand=%d' % (self.DOMAIN, random() * 100000), cookies = True) + response = self.load('%s/ajax/check_captcha.php' % self.DOMAIN, post = {"code": captcha}, cookies = True) self.logDebug(response) if not response: self.invalidCaptcha() |