-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathmuacloud.py
27 lines (23 loc) · 948 Bytes
/
muacloud.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from util import *
username = sys.argv[1] # 登录账号
password = sys.argv[2] # 登录密码
@retry(stop_max_attempt_number=5)
def muacloud():
try:
driver = get_web_driver()
# driver.get("https://12o.ooo/auth/login")
driver.get("https://12o.ooo/auth/login")
driver.find_element_by_xpath("//*[@id='email']").send_keys(username)
driver.find_element_by_xpath("//*[@id='password']").send_keys(password)
driver.find_element_by_xpath("//*[@id='login_submit']").click()
if driver.find_elements_by_xpath("//*[@id='checkin']") != []:
button = driver.find_element_by_xpath("//*[@id='checkin']")
driver.execute_script("arguments[0].click();", button)
# driver.find_element_by_xpath("//*[@id='checkin']").click()
print('muacloud签到成功')
except:
raise
finally:
driver.quit()
if __name__ == '__main__':
muacloud()