Browse Source

Sleep for 1-10 seconds after getting a channel's videos

master
blank X 1 year ago
parent
commit
e1f28600ad
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
  1. 2
      autoytarchive/workers.py

2
autoytarchive/workers.py

@ -2,6 +2,7 @@ import re
import os
import json
import time
import random
import asyncio
import logging
import tempfile
@ -55,6 +56,7 @@ async def _check_channels(nodl):
continue
asyncio.create_task(check_video(j))
tmp_handled.append(j['yt_videoid'])
await asyncio.sleep(random.randint(1, 10))
async def check_video(video):
for _ in range(5):

Loading…
Cancel
Save