cherry pick
This commit is contained in:
10
邮件批量发送脚本.py
10
邮件批量发送脚本.py
@@ -290,17 +290,17 @@ def main():
|
|||||||
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"))
|
||||||
locate("div.io-ox-mail-compose-window iframe", condition=EC.frame_to_be_available_and_switch_to_it)
|
locate("div.io-ox-mail-compose-window iframe", condition=EC.frame_to_be_available_and_switch_to_it)
|
||||||
|
|
||||||
if command > 0 and (selection := greetings[command]):
|
if command > 0 and (entry := greetings[command]):
|
||||||
match datetime.now(timezone).hour:
|
match datetime.now(timezone).hour:
|
||||||
case hour if 6 <= hour < 12: registry = selection.get('registry')[0]
|
case hour if 6 <= hour < 12: registry = entry.get('registry')[0]
|
||||||
case hour if 12 <= hour < 18: registry = selection.get('registry')[1]
|
case hour if 12 <= hour < 18: registry = entry.get('registry')[1]
|
||||||
case hour if 18 <= hour < 21: registry = selection.get('registry')[2]
|
case hour if 18 <= hour < 21: registry = entry.get('registry')[2]
|
||||||
case _: registry = None
|
case _: registry = None
|
||||||
|
|
||||||
clean = False
|
clean = False
|
||||||
iframe = driver.switch_to.active_element
|
iframe = driver.switch_to.active_element
|
||||||
action = ActionChains(driver)
|
action = ActionChains(driver)
|
||||||
hello: str = registry or selection.get('default')
|
hello: str = registry or entry.get('default')
|
||||||
|
|
||||||
if name is not None and (name := str(name).strip()) and not contains_non_latin_alphabet(name):
|
if name is not None and (name := str(name).strip()) and not contains_non_latin_alphabet(name):
|
||||||
const = config.CONSTANTS
|
const = config.CONSTANTS
|
||||||
|
|||||||
Reference in New Issue
Block a user