update: fixed time estimation
This commit is contained in:
@@ -217,13 +217,14 @@ def main():
|
|||||||
return 5
|
return 5
|
||||||
|
|
||||||
rate = 60 / (args.interval + 3)
|
rate = 60 / (args.interval + 3)
|
||||||
|
length = list.count(sents, None)
|
||||||
command = None
|
command = None
|
||||||
timezone = ZoneInfo(args.timezone)
|
timezone = ZoneInfo(args.timezone)
|
||||||
|
|
||||||
print(f'[信息] 当前发送速率 {round(rate, 2)} 封/分钟')
|
print(f'[信息] 当前发送速率 {round(rate, 2)} 封/分钟')
|
||||||
print(f'[信息] 预计使用时间 {timedelta(minutes=limit / rate)}')
|
|
||||||
if rate > 8.33: print('[警告] 当前发送速率已超出限制 8.33 封/分钟')
|
if rate > 8.33: print('[警告] 当前发送速率已超出限制 8.33 封/分钟')
|
||||||
|
print(f'[信息] 计划发送 {length} 封')
|
||||||
|
print(f'[信息] 预计使用时间 {timedelta(minutes=length / rate)}')
|
||||||
print(f'[信息] 当前时区:{args.timezone}')
|
print(f'[信息] 当前时区:{args.timezone}')
|
||||||
print(f'[信息] 已读取可用问候语 {len(greetings)} 条:', end='\n\n')
|
print(f'[信息] 已读取可用问候语 {len(greetings)} 条:', end='\n\n')
|
||||||
|
|
||||||
@@ -283,7 +284,7 @@ def main():
|
|||||||
try:
|
try:
|
||||||
clean = True
|
clean = True
|
||||||
attempt += 1
|
attempt += 1
|
||||||
print(f'[信息] 正在发送:{recipient}')
|
print('[信息] 正在发送:%s (%.2f %%)' % (recipient, current / limit))
|
||||||
click("button[aria-label='Edit copy']")
|
click("button[aria-label='Edit copy']")
|
||||||
|
|
||||||
ready(driver, lambda x: x.find_element(By.CSS_SELECTOR, ".io-ox-busy"))
|
ready(driver, lambda x: x.find_element(By.CSS_SELECTOR, ".io-ox-busy"))
|
||||||
|
|||||||
Reference in New Issue
Block a user