Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21a7fc commit cda8da2Copy full SHA for cda8da2
1 file changed
lib/request/connect.py
@@ -63,6 +63,9 @@ def getPage(**kwargs):
63
64
if conf.delay is not None and isinstance(conf.delay, (int, float)) and conf.delay > 0:
65
time.sleep(conf.delay)
66
+ elif conf.cpuThrottle:
67
+ delay = 0.00001 * (conf.cpuThrottle ** 2)
68
+ time.sleep(delay)
69
70
url = kwargs.get('url', conf.url).replace(" ", "%20")
71
get = kwargs.get('get', None)
@@ -260,10 +263,6 @@ def getPage(**kwargs):
260
263
261
264
logger.log(8, responseMsg)
262
265
- if conf.cpuThrottle:
- delay = 0.00001 * (conf.cpuThrottle ** 2)
- time.sleep(delay)
266
-
267
return page, responseHeaders
268
269
@staticmethod
0 commit comments