当前位置:网站首页>Shanghai Second Polytechnic University - Health Daily autocheck
Shanghai Second Polytechnic University - Health Daily autocheck
2022-07-25 22:56:00 【Panzer_ Jack】
Shanghai Second University of Technology - Health Daily AutoCheck
Preface
The project is based on I was called by the monitor this afternoon Told 《 On the importance of signing in in the morning and the possibility of being punished if you don't sign 》 after Think it over ... Then I found that compared with relying on my own memory, which is the same as that of a whale .. It's better to rely on computers directly ... So I wrote this reptile ...
step :
· Prepare relevant modules
· python scripting
· Python Program EXE Executable files packing
· Win10 Under the system Automatically run script code by time
Get ready :
- Python
- selenium modular
- chromedriver( Corresponding to your own version of Google viewer , You can use the mirror website to download )
scripting :
Import related modules :
Import related modules , Build a simulation tour , I use it Chrome, You can also use other browsers :
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import selenium.webdriver
Anti creeping :
<!-- Anti auto script detection -->
opt = Options()
opt.add_experimental_option('excludeSwitches', ['enable-automation'])
driver = selenium.webdriver.Chrome(options=opt)
It runs automatically in the background :
opt.add_argument('--headless')
opt.add_argument('disbale-gpu')
Open the campus network :
url = "https://hsm.sspu.edu.cn/"
driver.get(url)
time.sleep(2)
Sign in :
driver.find_element_by_id("username").send_keys(" Your account number ")
driver.find_element_by_id("password").send_keys(" Your password ")
driver.find_element_by_class_name("submit_button").click()
time.sleep(1)
driver.find_element_by_class_name("icos").click()
driver.find_element_by_id("fineui_2-inputEl-icon").click()
driver.find_element_by_id("p1_TiWen-inputEl").send_keys("36")
driver.find_element_by_class_name("f-field-checkbox-switch").click()
time.sleep(2)
driver.find_element_by_class_name("f-btn-text").click()
Automatically exit the browser
time.sleep(3)
driver.quit()
Python Program EXE packing :
pip3 install pyinstaller
<!-- Use cmd Command desk -->
pip3 install pyinstaller
pyinstaller packing python Script
<!-- Use cmd Command to switch to the current path -->
<!-- Then execute the command ( Below xxxx Write the name of your own program ): -->
pyinstaller xxxx.py
<!-- And then in that directory ./dist/xxxx/xxxx.exe appear exe file -->
Win10 Under the system Automatically run script code by time :
- open Control panel \ Systems and security \ Management tools \ Task scheduler
- Create basic tasks ( In the right column ): Name description you write casually
- Then sign in at Every day ( Anyway, we have to sign in every day )
- everyday : Starting time Namely Starting time
- operation : Start the program
- Program and script Traction to What you packed before python exe On the execution file
- Click finish
- Duplicate establishment Multiple execution tasks ( Prevent a jam The crawler failed )
边栏推荐
- Simple setting of drop-down triangle
- Experiment 1, experiment 2 and Experiment 3 of assembly language and microcomputer principle: branch program design / loop program design / subroutine design
- The difference between abstract classes and interface interfaces
- [paper notes] a meta reinforcement learning algorithm for causal discovery
- Data type conversion
- How to obtain the cash flow data of advertising services to help analyze the advertising effect?
- CUDA environment construction
- invalid syntax
- Learning notes of technical art hundred people plan (1) -- basic rendering pipeline
- TFrecord写入与读取
猜你喜欢

CMU AI PhD 第一年总结

Examples and points for attention about the use of getchar and scanf

Compiler introduction
![[training Day11] Nescafe [greed]](/img/4f/c9c7ae8a7b09ee58dd0fdbc55baf72.png)
[training Day11] Nescafe [greed]

Qt中文编程遇C2001错误,提示“常量中有换行符”

Interview question 17.11. word distance ●●

Qt5.12 installation error prompt: c:\qt5.12.11\vcredist\vcredist_ msvc2019_ x86.exe /norestart /q

QT Chinese programming encounters c2001 error, prompting "there is a newline character in the constant"
![[training day15] boring [tree DP]](/img/78/dc80076bb9fc4cf008c51b00ece431.png)
[training day15] boring [tree DP]

Two methods of printing strings in reverse order in C language
随机推荐
Day 3 experiment
Panzer_ Jack's personal blog founding day
7-1 understand everything
[training Day12] tree! Tree! Tree! [greed] [minimum spanning tree]
CMU AI PhD 第一年总结
【论文笔记】A Meta-Reinforcement Learning Algorithm for Causal Discovery
[training day15] good name [hash]
[training Day12] be go! [dynamic programming] [mathematics]
内存分页与调优,内核与用户空间
PE format: analyze and implement IATHOOK
Vs2017 compilation encountered the error HResult e returned by the call of COM component_ FAIL
Stack simulation queue
Dom and events
新媒体运营策略(以小红书为例)帮助你快速掌握爆款创作方法
[training day13] backpack [dynamic planning] [greed]
Learning orientation today
Network Security Learning (XII) OSI and TCP
Tfrecord write and read
721. Account consolidation ●●, and collection
Ip--- ia review