summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-01-31 23:46:36 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-01-31 23:46:36 +0100
commitf263d18eff143982095c829cc86858c8025247a5 (patch)
treec183ad531a3f1e6b3d72c89601efd524d1b08b01
parentproxy fix (diff)
downloadpyload-f263d18eff143982095c829cc86858c8025247a5.tar.xz
really fixed proxy support
-rw-r--r--module/network/HTTPRequest.py4
-rw-r--r--module/plugins/Plugin.py8
-rw-r--r--module/plugins/crypter/LofCc.py2
-rw-r--r--module/plugins/crypter/SerienjunkiesOrg.py2
-rw-r--r--module/plugins/hoster/UploadedTo.py2
5 files changed, 15 insertions, 3 deletions
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py
index 25563cd72..13e76d5a2 100644
--- a/module/network/HTTPRequest.py
+++ b/module/network/HTTPRequest.py
@@ -89,8 +89,8 @@ class HTTPRequest():
self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_SOCKS5)
else:
self.c.setopt(pycurl.PROXYTYPE, pycurl.PROXYTYPE_HTTP)
-
- self.c.setopt(pycurl.PROXY, proxy["address"])
+
+ self.c.setopt(pycurl.PROXY, str(proxy["address"])) #unicode issues...
self.c.setopt(pycurl.PROXYPORT, proxy["port"])
if proxy["username"]:
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 8af61c5fc..0a1eba0ee 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -224,6 +224,14 @@ class Plugin(object):
if self.ctresult:
self.self.ctresult.fail()
raise Retry
+
+ def invalidCaptcha(self):
+ if self.ctresult:
+ self.self.ctresult.fail()
+
+ def correctCaptcha(self):
+ if self.ctresult:
+ self.self.ctresult.success()
def decryptCaptcha(self, url, get={}, post={}, cookies=False, forceUser=False, imgtype="jpg"):
""" loads the catpcha and decrypt it or ask the user for input """
diff --git a/module/plugins/crypter/LofCc.py b/module/plugins/crypter/LofCc.py
index 3785ce600..9c98c48a0 100644
--- a/module/plugins/crypter/LofCc.py
+++ b/module/plugins/crypter/LofCc.py
@@ -35,6 +35,8 @@ class LofCc(Crypter):
if re.search("class=\"error\"", resultHTML):
self.retry()
+ self.correctCaptcha()
+
dlc = self.req.load(self.pyfile.url+"/dlc", cookies=True)
name = re.search(self.__pattern__, self.pyfile.url).group(1)+".dlc"
diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py
index 7d637369e..dcc2e6203 100644
--- a/module/plugins/crypter/SerienjunkiesOrg.py
+++ b/module/plugins/crypter/SerienjunkiesOrg.py
@@ -145,6 +145,8 @@ class SerienjunkiesOrg(Crypter):
self.retry()
return
+ self.correctCaptcha()
+
links = []
for link in rawLinks:
frameUrl = link["action"].replace("/go-", "/frame/go-")
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 02f6b529c..4553f1dfd 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -101,8 +101,8 @@ class UploadedTo(Hoster):
check = self.checkDownload({"wrong_captcha": "Wrong captcha."})
if check == "wrong_captcha":
+ self.invalidCaptcha()
self.process(pyfile)
-
def download_api_data(self, force=False):
if self.api_data and not force: