feat: add delay option

This commit is contained in:
ForgQi committed 2022-07-03 00:48:55 +08:00
1 parent c797c7b7de
commit ed4dca3aa9
5 files changed
+12 -4

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
import logging
import sys
__version__ = "0.2.19"
__version__ = "0.3.0"
LOG_CONF = {
'version': 1,
+6
View File
@@ -100,6 +100,12 @@ class DownloadBase:
finally:
self.close()
if ret is False:
if config.get('delay'):
time.sleep(config.get('delay'))
logger.info(f"delay: {config.get('delay')}")
if self.check_stream():
time.sleep(5)
continue
break
elif ret == 1 or self.downloader == 'stream-gears':
time.sleep(45)
+2 -1
View File
@@ -73,7 +73,8 @@ streamers:
opt_args: # ffmpeg参数
- '-ss' # 跳过开始的16秒
- '00:00:16'
# 检测到主播下播后延迟再次检测,单位:秒,避免特殊情况提早启动上传导致漏录
delay: 10
# 检测间隔时间,单位:秒
event_loop_interval: 40
# 相同平台检测间隔,单位:秒。不同平台的链接是并发的,不受此参数影响
+2 -1
View File
@@ -22,7 +22,8 @@ filtering_threshold = 20 # 小于此大小的视频文件将会被过滤删除
#douyin_cookie = '__ac_nonce=123456; __ac_signature=123456;'
# Netscape 格式的 Cookies 文本路径
#youtube_cookie = 'cookiejar.txt'
# 检测到主播下播后延迟再次检测,单位:秒,避免特殊情况提早启动上传导致漏录
delay = 10
# 检测间隔时间,单位:秒
event_loop_interval = 40
# 相同平台检测间隔,单位:秒。不同平台的链接是并发的,不受此参数影响
+1 -1
View File
@@ -10,7 +10,7 @@ keywords = ["bilibili douyu huya"]
urls = {Homepage = "https://github.com/ForgQi/bilibiliupload"}
requires-python = ">= 3.7"
dependencies = [
"stream-gears >= 0.1.7",
"stream-gears >= 0.1.8",
"psutil >= 5.4.6",
"yt_dlp >= 2022.3.8.2",
"Pillow >= 5.2.0",