summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/Captcha9Kw.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-14 11:07:54 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-14 11:07:54 +0100
commite65d19ee3a1e435bf2896ed829e5581eeef92dd2 (patch)
treecf5bb073899205a2f00ddeca8df8b9f3944ea835 /module/plugins/hooks/Captcha9Kw.py
parent[HotFolder] Missing exception (diff)
downloadpyload-e65d19ee3a1e435bf2896ed829e5581eeef92dd2.tar.xz
Import cleanup for datetime and time modules
Diffstat (limited to 'module/plugins/hooks/Captcha9Kw.py')
-rw-r--r--module/plugins/hooks/Captcha9Kw.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hooks/Captcha9Kw.py b/module/plugins/hooks/Captcha9Kw.py
index 6d42416ff..825db510b 100644
--- a/module/plugins/hooks/Captcha9Kw.py
+++ b/module/plugins/hooks/Captcha9Kw.py
@@ -3,9 +3,9 @@
from __future__ import with_statement
import re
+import time
from base64 import b64encode
-from time import sleep
from module.network.HTTPRequest import BadHeader
from module.network.RequestFactory import getURL
@@ -134,7 +134,7 @@ class Captcha9Kw(Hook):
try:
res = getURL(self.API_URL, post=post_data)
except BadHeader, e:
- sleep(3)
+ time.sleep(3)
else:
if res and res.isdigit():
break
@@ -156,7 +156,7 @@ class Captcha9Kw(Hook):
'action': "usercaptchacorrectdata"})
if not result or result == "NO DATA":
- sleep(5)
+ time.sleep(5)
else:
break
else:
@@ -193,7 +193,7 @@ class Captcha9Kw(Hook):
if queue < re.search(r'queue=(\d+)', servercheck).group(1):
break
- sleep(10)
+ time.sleep(10)
else:
self.fail(_("Too many captchas in queue"))
@@ -244,7 +244,7 @@ class Captcha9Kw(Hook):
if res == "OK":
break
- sleep(5)
+ time.sleep(5)
else:
self.logDebug("Could not send %s request: %s" % (type, res))