aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/subscriptions.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-08-14 16:40:42 -0700
committerJames Taylor <user234683@users.noreply.github.com>2019-08-14 16:40:42 -0700
commite2c9081aee4730a36228998354d6568f1c206df9 (patch)
tree24a6e5ddee6eb7eddd0424c6b403644ec9589306 /youtube/subscriptions.py
parente69ea5910f4e195a65940c6de2ae521e8d821c85 (diff)
downloadyt-local-e2c9081aee4730a36228998354d6568f1c206df9.tar.lz
yt-local-e2c9081aee4730a36228998354d6568f1c206df9.tar.xz
yt-local-e2c9081aee4730a36228998354d6568f1c206df9.zip
Subscriptions: double auto-check rate
Diffstat (limited to 'youtube/subscriptions.py')
-rw-r--r--youtube/subscriptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py
index 60d5531..27cc5c7 100644
--- a/youtube/subscriptions.py
+++ b/youtube/subscriptions.py
@@ -382,7 +382,7 @@ def _get_upstream_videos(channel_id):
# add some quantization and randomness to make pattern analysis by Youtube slightly harder
quantized_upload_period = average_upload_period - (average_upload_period % (4*3600)) + 4*3600 # round up to nearest 4 hours
randomized_upload_period = quantized_upload_period*(1 + secrets.randbelow(50)/50*0.5) # randomly between 1x and 1.5x
- next_check_delay = randomized_upload_period/5 # check at 5x the channel posting rate. might want to fine tune this number
+ next_check_delay = randomized_upload_period/10 # check at 10x the channel posting rate. might want to fine tune this number
next_check_time = int(time.time() + next_check_delay)
with open_database() as connection: