1.编写python脚本
2.编写bat控制python脚本的代码
3.将bat文件放到开机启动文件夹下。开机就会启动。
代码如下:
#coding=utf-8 """ author=wanggang date:Feb,05,2020 """ from selenium import webdriver import time url='https://pass.neu.edu.cn/tpass/login?service=https%3A%2F%2Fipgw.neu.edu.cn%2Fsrun_cas.php%3Fac_id%3D1' #driver = webdriver.Chrome() driver = webdriver.Chrome("C:\\Program Files (x86)\Google\\Chrome\\Application\\chromedriver.exe") driver.get(url) driver.find_element_by_id('un').send_keys('1910636') driver.find_element_by_id('pd').send_keys('1234qwer') driver.find_element_by_id('index_login_btn').click() time.sleep(3) driver.close()