summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/LinkSaveIn.py4
-rw-r--r--module/plugins/crypter/NCryptIn.py2
-rw-r--r--module/plugins/crypter/RelinkUs.py2
-rw-r--r--module/plugins/hoster/FileserveCom.py4
-rw-r--r--module/plugins/hoster/FshareVn.py5
-rw-r--r--module/plugins/hoster/RapidshareCom.py2
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py7
-rw-r--r--module/plugins/hoster/UploadedTo.py13
8 files changed, 20 insertions, 19 deletions
diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py
index 3e37f3610..e601e8173 100644
--- a/module/plugins/crypter/LinkSaveIn.py
+++ b/module/plugins/crypter/LinkSaveIn.py
@@ -140,7 +140,7 @@ class LinkSaveIn(SimpleCrypter):
elif type_ == "web":
return self.handleWebLinks()
else:
- self.fail('unknown source type "%s" (this is probably a bug)' % type_)
+ self.error('unknown source type "%s" (this is probably a bug)' % type_)
def handleWebLinks(self):
@@ -176,7 +176,7 @@ class LinkSaveIn(SimpleCrypter):
type_ = type_.lower()
self.logDebug("Seach for %s Container links" % type_.upper())
if not type_.isalnum(): # check to prevent broken re-pattern (cnl2,rsdf,ccf,dlc,web are all alpha-numeric)
- self.fail('unknown container type "%s" (this is probably a bug)' % type_)
+ self.error('unknown container type "%s" (this is probably a bug)' % type_)
pattern = r'\(\'%s_link\'\).href=unescape\(\'(.*?\.%s)\'\)' % (type_, type_)
containersLinks = re.findall(pattern, self.html)
self.logDebug("Found %d %s Container links" % (len(containersLinks), type_.upper()))
diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py
index ef696dbd8..54b6eeba2 100644
--- a/module/plugins/crypter/NCryptIn.py
+++ b/module/plugins/crypter/NCryptIn.py
@@ -205,7 +205,7 @@ class NCryptIn(Crypter):
elif link_source_type == "web":
return self.handleWebLinks()
else:
- self.fail('unknown source type "%s" (this is probably a bug)' % link_source_type)
+ self.error('unknown source type "%s" (this is probably a bug)' % link_source_type)
def handleSingleLink(self):
diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py
index 09b83b82b..b4ee31568 100644
--- a/module/plugins/crypter/RelinkUs.py
+++ b/module/plugins/crypter/RelinkUs.py
@@ -188,7 +188,7 @@ class RelinkUs(Crypter):
elif source == 'web':
return self.handleWEBLinks()
else:
- self.fail('Unknown source [%s] (this is probably a bug)' % source)
+ self.error('Unknown source [%s] (this is probably a bug)' % source)
def handleCNL2Links(self):
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 7a06472d3..0f8372cf7 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -105,13 +105,13 @@ class FileserveCom(Hoster):
self.doTimmer()
else:
- self.fail("Unknown server response")
+ self.error("Unknown server response")
# show download link
response = self.load(self.url, post={"downloadLink": "show"}, decode=True)
self.logDebug("Show downloadLink response : %s" % response)
if "fail" in response:
- self.fail("Couldn't retrieve download url")
+ self.error("Couldn't retrieve download url")
# this may either download our file or forward us to an error page
self.download(self.url, post={"download": "normal"})
diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py
index 7ce7cd3e6..23a66a1c1 100644
--- a/module/plugins/hoster/FshareVn.py
+++ b/module/plugins/hoster/FshareVn.py
@@ -111,8 +111,9 @@ class FshareVn(SimpleHoster):
self.wait(wait_until - mktime(gmtime()) - 7 * 60 * 60, True)
self.retry()
elif '<ul class="message-error">' in self.html:
- self.logError("Unknown error occured or wait time not parsed")
- self.retry(30, 2 * 60, "Unknown error")
+ msg = "Unknown error occured or wait time not parsed"
+ self.logError(msg)
+ self.retry(30, 2 * 60, msg)
def checkDownloadedFile(self):
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
index 2dd36b84e..b0462e82c 100644
--- a/module/plugins/hoster/RapidshareCom.py
+++ b/module/plugins/hoster/RapidshareCom.py
@@ -106,7 +106,7 @@ class RapidshareCom(Hoster):
elif self.api_data['status'] == "3":
self.tempOffline()
else:
- self.fail("Unknown response code.")
+ self.error("Unknown response code.")
def handleFree(self):
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index b7c112a45..565e0364a 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -176,9 +176,10 @@ class ShareonlineBiz(Hoster):
return
err = m.group(1)
- m = re.search(self.ERROR_INFO_PATTERN, self.html)
- msg = m.group(1) if m else ""
- self.logError(err, msg or "Unknown error occurred")
+ try:
+ self.logError(err, re.search(self.ERROR_INFO_PATTERN, self.html).group(1))
+ except:
+ self.logError(err, "Unknown error occurred")
if err == "invalid":
self.fail(msg or "File not available")
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 764bb75de..055047859 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -94,7 +94,7 @@ def getInfo(urls):
class UploadedTo(Hoster):
__name__ = "UploadedTo"
__type__ = "hoster"
- __version__ = "0.74"
+ __version__ = "0.75"
__pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)'
@@ -198,16 +198,15 @@ class UploadedTo(Hoster):
self.fail("File not downloadable for free users")
self.setWait(int(m.group(1)))
- js = self.load("http://uploaded.net/js/download.js", decode=True)
-
- challengeId = re.search(r'Recaptcha\.create\("([^"]+)', js)
+ self.html = self.load("http://uploaded.net/js/download.js", decode=True)
url = "http://uploaded.net/io/ticket/captcha/%s" % self.fileID
downloadURL = ""
+ recaptcha = ReCaptcha(self)
+
for _ in xrange(5):
- re_captcha = ReCaptcha(self)
- challenge, result = re_captcha.challenge(challengeId.group(1))
+ challenge, result = recaptcha.challenge()
options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": result}
self.wait()
@@ -234,7 +233,7 @@ class UploadedTo(Hoster):
downloadURL = re.search("url:'([^']+)", result).group(1)
break
else:
- self.fail("Unknown error '%s'" % result)
+ self.error("Unknown error '%s'" % result)
if not downloadURL:
self.fail("No Download url retrieved/all captcha attempts failed")