diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 01:06:01 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 01:06:01 +0200 |
commit | 1ef93e913238275f7657d496ba3d2e7eeb5a30a2 (patch) | |
tree | c52a2ab51763fce4a9b47d3c62388a27ebdeeda8 /module/plugins/hooks/CaptchaBrotherhood.py | |
parent | Fix https://github.com/pyload/pyload/issues/1373 (diff) | |
download | pyload-1ef93e913238275f7657d496ba3d2e7eeb5a30a2.tar.xz |
Use 'import' instead 'from'
Diffstat (limited to 'module/plugins/hooks/CaptchaBrotherhood.py')
-rw-r--r-- | module/plugins/hooks/CaptchaBrotherhood.py | 11 |
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) |