summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/ExpertDecoders.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/ExpertDecoders.py')
-rw-r--r--module/plugins/hooks/ExpertDecoders.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py
index 79e98c020..ccd48f664 100644
--- a/module/plugins/hooks/ExpertDecoders.py
+++ b/module/plugins/hooks/ExpertDecoders.py
@@ -2,9 +2,10 @@
from __future__ import with_statement
+import pycurl
+import uuid
+
from base64 import b64encode
-from pycurl import LOW_SPEED_TIME
-from uuid import uuid4
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getURL, getRequest
@@ -48,7 +49,7 @@ class ExpertDecoders(Hook):
@threaded
def _processCaptcha(self, task):
- task.data['ticket'] = ticket = uuid4()
+ task.data['ticket'] = ticket = uuid.uuid4()
result = None
with open(task.captchaFile, 'rb') as f:
@@ -56,7 +57,7 @@ class ExpertDecoders(Hook):
req = getRequest()
#raise timeout threshold
- req.c.setopt(LOW_SPEED_TIME, 80)
+ req.c.setopt(pycurl.LOW_SPEED_TIME, 80)
try:
result = req.load(self.API_URL,