Sleep for 1-10 seconds after getting a channel's videos
This commit is contained in:
parent
d2ae468427
commit
fe1af6900a
|
@ -2,6 +2,7 @@ import re
|
|||
import sys
|
||||
import time
|
||||
import html
|
||||
import random
|
||||
import asyncio
|
||||
import logging
|
||||
import yaml
|
||||
|
@ -160,6 +161,7 @@ async def main():
|
|||
else:
|
||||
logging.info('Handling %s', video_id)
|
||||
asyncio.create_task(handle_video(video_id, video_title))
|
||||
await asyncio.sleep(random.randint(1, 10))
|
||||
if loadmode:
|
||||
await save_seen_videos()
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue