This commit is contained in:
ddrwode
2026-03-06 14:35:46 +08:00
parent 5711edf5fe
commit 9379b7bd47

View File

@@ -492,31 +492,31 @@ class BossRecruitHandler(BaseTaskHandler):
# 与 1.py 一致a = page.get_frame(1) # 与 1.py 一致a = page.get_frame(1)
a = page.get_frame(1) a = page.get_frame(1)
time.sleep(random.uniform(0.5, 1.2)) time.sleep(random.uniform(0.5, 5))
# 与 1.py 一致:打招呼 # 与 1.py 一致:打招呼
a.ele(f'x://*[contains(text(),"打招呼")]', timeout=2).click(by_js=True) a.ele(f'x://*[contains(text(),"打招呼")]', timeout=2).click(by_js=True)
time.sleep(random.uniform(0.5, 1.2)) time.sleep(random.uniform(0.5, 5))
# 与 1.py 一致:收藏 # 与 1.py 一致:收藏
a.ele(f'x://*[contains(text(),"收藏")]', timeout=2).click(by_js=True) a.ele(f'x://*[contains(text(),"收藏")]', timeout=2).click(by_js=True)
time.sleep(random.uniform(0.5, 1.2)) time.sleep(random.uniform(0.5, 5))
# 与 1.py 一致btn-outline × 3 # 与 1.py 一致btn-outline × 3
for i in range(3): for i in range(3):
a.ele(f'x://*[@class="btn-v2 btn-outline-v2"]', timeout=2).click(by_js=True) a.ele('x://*[@class="btn-v2 btn-outline-v2"]').click(by_js=True)
time.sleep(random.uniform(0.5, 1.2)) time.sleep(random.uniform(0.5, 5))
# 与 1.py 一致:快速回复 + 发送 # 与 1.py 一致:快速回复 + 发送
page.ele(f'x://*[@data-placeholder="快速回复"]', timeout=2).input(FAST_REPLY_TEXT) page.ele(f'x://*[@data-placeholder="快速回复"]', timeout=2).input(FAST_REPLY_TEXT)
page.ele(f'x://*[contains(text(),"发送")]', timeout=2).click() page.ele(f'x://*[contains(text(),"发送")]', timeout=2).click()
time.sleep(random.uniform(0.5, 1.2)) time.sleep(random.uniform(0.5, 5))
# 与 1.py 一致:关闭面板 # 与 1.py 一致:关闭面板
page.ele('x://*[@class="iboss iboss-close"]').click() page.ele('x://*[@class="iboss iboss-close"]').click()
time.sleep(random.uniform(0.5, 1.2)) time.sleep(random.uniform(0.5, 5))
a.ele('x://*[@class="boss-popup__close"]').click() a.ele('x://*[@class="boss-popup__close"]').click()
time.sleep(random.uniform(0.5, 1.2)) time.sleep(random.uniform(0.5, 5))
panel_opened = False panel_opened = False
return True return True