Sleep for 1-10 seconds after getting a channel's videos
This commit is contained in:
parent
cf794c01c7
commit
e1f28600ad
|
@ -2,6 +2,7 @@ import re
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
import random
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -55,6 +56,7 @@ async def _check_channels(nodl):
|
||||||
continue
|
continue
|
||||||
asyncio.create_task(check_video(j))
|
asyncio.create_task(check_video(j))
|
||||||
tmp_handled.append(j['yt_videoid'])
|
tmp_handled.append(j['yt_videoid'])
|
||||||
|
await asyncio.sleep(random.randint(1, 10))
|
||||||
|
|
||||||
async def check_video(video):
|
async def check_video(video):
|
||||||
for _ in range(5):
|
for _ in range(5):
|
||||||
|
|
Loading…
Reference in New Issue