summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/CaptchaBrotherhood.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/CaptchaBrotherhood.py')
-rw-r--r--module/plugins/hooks/CaptchaBrotherhood.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py
index e5285a493..bda080037 100644
--- a/module/plugins/hooks/CaptchaBrotherhood.py
+++ b/module/plugins/hooks/CaptchaBrotherhood.py
@@ -5,14 +5,13 @@ from __future__ import with_statement
import StringIO
import pycurl
import time
+import urllib
try:
from PIL import Image
except ImportError:
import Image
-from urllib import urlencode
-
from module.network.RequestFactory import getURL, getRequest
from module.plugins.Hook import Hook, threaded
@@ -90,10 +89,10 @@ class CaptchaBrotherhood(Hook):
req = getRequest()
url = "%ssendNewCaptcha.aspx?%s" % (self.API_URL,
- urlencode({'username' : self.getConfig('username'),
- 'password' : self.getConfig('passkey'),
- 'captchaSource': "pyLoad",
- 'timeout' : "80"}))
+ urllib.urlencode({'username' : self.getConfig('username'),
+ 'password' : self.getConfig('passkey'),
+ 'captchaSource': "pyLoad",
+ 'timeout' : "80"}))
req.c.setopt(pycurl.URL, url)
req.c.setopt(pycurl.POST, 1)