aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--youtube/util.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube/util.py b/youtube/util.py
index 44ae1ba..701d922 100644
--- a/youtube/util.py
+++ b/youtube/util.py
@@ -61,9 +61,9 @@ connection_pool = urllib3.PoolManager(cert_reqs='CERT_REQUIRED')
class TorManager:
MAX_TRIES = 3
- # Remember the 6-sec wait times, so make cooldown be two of those
+ # Remember the 7-sec wait times, so make cooldown be two of those
# (otherwise it will retry forever if 429s never end)
- COOLDOWN_TIME = 12
+ COOLDOWN_TIME = 14
def __init__(self):
self.old_tor_connection_pool = None
@@ -150,8 +150,8 @@ class TorManager:
# be a new IP, based on experiments.
# Not necessary after first new identity
if original_try_num > 1:
- print('Sleeping for 6 seconds before retrying request')
- time.sleep(6) # experimentally determined minimum
+ print('Sleeping for 7 seconds before retrying request')
+ time.sleep(7) # experimentally determined minimum
return None
finally: