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

This commit is contained in:
blank X 2021-04-17 21:16:11 +07:00
parent cf794c01c7
commit e1f28600ad
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 2 additions and 0 deletions

View File

@ -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):