summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-04-11 00:40:29 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-04-11 00:40:29 +0200
commit5ce7835dc10327b62e642d4fab48061ade0ae0c0 (patch)
tree9fbd7ec70e23187981ea589620e34fd83aa16c1a /module/plugins
parentversion bump (diff)
downloadpyload-5ce7835dc10327b62e642d4fab48061ade0ae0c0.tar.xz
update letitbit, depositfiles, ul.to; add trailerzone crypter by godofdream
closed #570
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/crypter/TrailerzoneInfo.py45
-rw-r--r--module/plugins/hoster/DepositfilesCom.py10
-rw-r--r--module/plugins/hoster/LetitbitNet.py25
-rw-r--r--module/plugins/hoster/UploadedTo.py15
4 files changed, 76 insertions, 19 deletions
diff --git a/module/plugins/crypter/TrailerzoneInfo.py b/module/plugins/crypter/TrailerzoneInfo.py
new file mode 100644
index 000000000..e52c5429c
--- /dev/null
+++ b/module/plugins/crypter/TrailerzoneInfo.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+
+import re
+from module.plugins.Crypter import Crypter
+
+class TrailerzoneInfo(Crypter):
+ __name__ = "TrailerzoneInfo"
+ __type__ = "container"
+ __pattern__ = r"http://(www\.)?trailerzone.info/.*?"
+ __version__ = "0.01"
+ __description__ = """TrailerZone.info Crypter Plugin"""
+ __author_name__ = ("godofdream")
+ __author_mail__ = ("soilfiction@gmail.com")
+
+ JS_KEY_PATTERN = r"<script>(.*)var t = window"
+
+ def decrypt(self, pyfile):
+ protectPattern = re.compile("http://(www\.)?trailerzone.info/protect.html.*?")
+ goPattern = re.compile("http://(www\.)?trailerzone.info/go.html.*?")
+ url = pyfile.url
+ if protectPattern.match(url):
+ self.handleProtect(url)
+ elif goPattern.match(url):
+ self.handleGo(url)
+
+ def handleProtect(self, url):
+ self.handleGo("http://trailerzone.info/go.html#:::" + url.split("#:::",1)[1])
+
+ def handleGo(self, url):
+
+ src = self.req.load(str(url))
+ pattern = re.compile(self.JS_KEY_PATTERN, re.DOTALL)
+ found = re.search(pattern, src)
+
+ # Get package info
+ package_links = []
+ try:
+ result = self.js.eval(found.group(1) + " decodeLink('" + url.split("#:::",1)[1] + "');")
+ result = str(result)
+ self.logDebug("RESULT: %s" % result)
+ package_links.append(result)
+ self.core.files.addLinks(package_links, self.pyfile.package().id)
+ except Exception, e:
+ self.logDebug(e)
+ self.fail('Could not extract any links by javascript')
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index ede21e9ee..be5e65d52 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -11,7 +11,7 @@ class DepositfilesCom(SimpleHoster):
__name__ = "DepositfilesCom"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?depositfiles\.com(/\w{1,3})?/files/[\w]+"
- __version__ = "0.38"
+ __version__ = "0.39"
__description__ = """Depositfiles.com Download Hoster"""
__author_name__ = ("spoob", "zoidberg")
__author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz")
@@ -20,7 +20,7 @@ class DepositfilesCom(SimpleHoster):
FILE_OFFLINE_PATTERN = r'<span class="html_download_api-not_exists"></span>'
FILE_URL_REPLACEMENTS = [(r"\.com(/.*?)?/files", ".com/en/files"), (r"\.html$", "")]
- RECAPTCHA_PATTERN = r"Recaptcha.create\('([^']+)', this\);"
+ RECAPTCHA_PATTERN = r"Recaptcha.create\('([^']+)'"
DOWNLOAD_LINK_PATTERN = r'<form action="(http://.+?\.depositfiles.com/.+?)" method="get"'
def setup(self):
@@ -61,7 +61,7 @@ class DepositfilesCom(SimpleHoster):
params = {'fid' : found.group(1)}
self.logDebug ("FID: %s" % params['fid'])
- captcha_key = None
+ captcha_key = '6LdRTL8SAAAAAE9UOdWZ4d0Ky-aeA7XfSqyWDM2m'
found = re.search(self.RECAPTCHA_PATTERN, self.html)
if found: captcha_key = found.group(1)
self.logDebug ("CAPTCHA_KEY: %s" % captcha_key)
@@ -73,7 +73,7 @@ class DepositfilesCom(SimpleHoster):
self.html = self.load("http://depositfiles.com/get_file.php", get = params)
if '<input type=button value="Continue" onclick="check_recaptcha' in self.html:
- if not captcha_key: raise PluginParseError('Captcha key')
+ if not captcha_key: self.parseError('Captcha key')
if 'response' in params: self.invalidCaptcha()
params['challenge'], params['response'] = recaptcha.challenge(captcha_key)
self.logDebug(params)
@@ -86,7 +86,7 @@ class DepositfilesCom(SimpleHoster):
self.logDebug ("LINK: %s" % link)
break
else:
- raise PluginParseError('Download link')
+ self.parseError('Download link')
else:
self.fail('No valid captcha response received')
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()
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 00ffeae94..972a438df 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -84,7 +84,7 @@ class UploadedTo(Hoster):
__name__ = "UploadedTo"
__type__ = "hoster"
__pattern__ = r"(http://[\w\.-]*?uploaded\.to/.*?(file/|\?id=|&id=)[\w]+/?)|(http://[\w\.]*?ul\.to/(\?id=|&id=)?[\w\-]+/.+)|(http://[\w\.]*?ul\.to/(\?id=|&id=)?[\w\-]+/?)"
- __version__ = "0.55"
+ __version__ = "0.56"
__description__ = """Uploaded.to Download Hoster"""
__author_name__ = ("spoob", "mkaay", "zoidberg")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz")
@@ -109,7 +109,8 @@ class UploadedTo(Hoster):
self.fileID = getID(self.pyfile.url)
def process(self, pyfile):
- self.req.cj.setCookie("uploaded.to", "lang", "en")
+ self.req.cj.setCookie("uploaded.to", "lang", "en") # doesn't work anymore
+ self.load("http://uploaded.to/language/en")
api = getAPIData([pyfile.url])
@@ -179,8 +180,10 @@ class UploadedTo(Hoster):
self.logError("Free-download capacities exhausted.")
self.retry(24, 300)
- wait = re.search(r"Current waiting period: <span>(\d+)</span> seconds", self.html).group(1)
- self.setWait(wait)
+ found = re.search(r"Current waiting period: <span>(\d+)</span> seconds", self.html)
+ if not found:
+ self.fail("File not downloadable for free users")
+ self.setWait(int(found.group(1)))
js = self.load("http://uploaded.to/js/download.js", decode=True)
@@ -207,8 +210,8 @@ class UploadedTo(Hoster):
self.retry()
elif "limit-parallel" in result:
self.fail("Cannot download in parallel")
- elif "limit-dl" in result:
- self.setWait(30 * 60, True)
+ elif "You have reached the max. number of possible free downloads for this hour" in result: # limit-dl
+ self.setWait(60 * 60, True)
self.wait()
self.retry()
elif 'err:"captcha"' in result: