/ZJU_PunchClock

A selenium Automata for punching clock in Zhejiang University

Primary LanguagePythonApache License 2.0Apache-2.0

ZJU_PunchClock

Before you started, you need to guarantee that you’ve already installed python3 and pip3. If you’re working on a server, please also install Chrome before you install ChromDriver (because most of time you do not have Chrome already).

Note to use pip3 install Selenium==v4.0.0, not the latest Selenium!

Add the Config file

Before you start, add the config file config.ini in the upmost directory, with the foramt below:

[identification_information]
account_config=3190117890
password_config=Kita@8920

If you want to start using released APP

Download the right version of this software

Please go to the GitHub Release Website to download the right version of your app.

Install the chromedriver

We assume that you’ve already installed Chrome on your computer. If you haven’t, go to the Official Web to download it.

Install the Chrome driver

You also need to install chromedriver into your system PATH.

Before started

Before you install the chromedriver, you should have:

before started

Then you need to install the chromedriver.

Check for the right version of Chrome

Please open the current Chrome (if you have) and check which version you're in. For example, mine is 94.0.4606.

check for right version

Download the correct version of chromedriver

Go to the download website to download the correct version of ChromeDriver. If you're using Windows, make sure you download the Windows version. I'm using Mac, so I'll download the Mac version.

correct versionAfter downloading, please unzip the file and move it to your system PATH.

move into PATH

Then please check whether you've successfully installed your chromedriver. If you see the feedback below, you're all set.

examine

Notes:

- You must download exactly the same version of chromedriver as your chrome browser if you want to use the chromedriver as your selenium driver. The chrome browser on your machine is likely to be updated automatically when a new version is released. In this case, please update to the newest version of chromedriver too.

- I strongly recommend you to install the chromedriver into the system software directory immediately, i.e. it should appear in /usr/local/bin/chromedriver.

Run the program

Just double-click on the program and it will automatically ask you to enter your account and password for logging in.


If you want to start from Scratch

Clone the repository

git clone https://github.com/BiEchi/ZJU_PunchClock

Install the dependencies on your python

pip3 install selenium
pip3 install time
pip3 install configparser

Install the chromedriver

We assume that you’ve already installed Chrome on your computer. If you haven’t, go to the Official Web to download it.

Install the Chrome driver

You also need to install chromedriver into your system PATH.

Before started

Before you install the chromedriver, you should have:

before started

Then you need to install the chromedriver.

Check for the right version of Chrome

Please open the current Chrome (if you have) and check which version you're in. For example, mine is 94.0.4606.

check for right version

Download the correct version of chromedriver

Go to the download website to download the correct version of ChromeDriver. If you're using Windows, make sure you download the Windows version. I'm using Mac, so I'll download the Mac version.

correct versionAfter downloading, please unzip the file and move it to your system PATH.

move into PATH

Then please check whether you've successfully installed your chromedriver. If you see the feedback below, you're all set.

examine

Notes:

- You must download exactly the same version of chromedriver as your chrome browser if you want to use the chromedriver as your selenium driver. The chrome browser on your machine is likely to be updated automatically when a new version is released. In this case, please update to the newest version of chromedriver too.

- I strongly recommend you to install the chromedriver into the system software directory immediately, i.e. it should appear in /usr/local/bin/chromedriver.

Run the program

At last, just run the main.py program.

python3 main.py