Add scrape advenced and simple sleep

This commit is contained in:
yoshiko2
2022-05-20 17:26:49 +08:00
parent 7227ba9d0b
commit ece9967d3c
3 changed files with 83 additions and 71 deletions

View File

@@ -1,6 +1,7 @@
import argparse
import json
import os
import random
import re
import sys
import time
@@ -636,6 +637,8 @@ def main(args: tuple) -> Path:
if count >= stop_count:
print("[!]Stop counter triggered!")
break
sleep_seconds = random.randint(conf.sleep(), conf.sleep() + 2)
time.sleep(sleep_seconds)
if conf.del_empty_folder() and not zero_op:
rm_empty_folder(conf.success_folder())