|
|
- # Library_Auto_Seats_Pick
-
- ##### For Cloud Computing Course
-
- 19级 杨浩然
-
- ------
-
- 助教老师:
-
- UCLOUD云主机镜像名称为Library_Auto_Seats_Pick,ID为uimage-2yzhlk2p,请您检查。谢谢!
-
- 云主机用户名、密码如下:
-
- ###### root
-
- ###### Glitzyi299
-
- ```shell
- cd /autobook/
- nohup ./run.py >/dev/null 2>&1 &
- ```
-
-
-
- 另:该程序偶尔出现bug,若出现无法抢得座位的情况,可能是暂时无座位释放,或者selenium对元素的交互失败等原因。可以移步我的demo文件夹查看演示视频。再次感谢!
-
- ### Background
-
- The end of each semester could always evoke the students' enthusiasm for learning, while the library resources of Zhongbei campus are quite worse than Minhang campus, which means there is more competition for seats. And this might cause some students can't reserve a seat for several days.
-
- This project aims to provide automatic seat-grab solutions for students with low screen time, raising the efficiency of seats grabbing.
-
-
-
- ### Install
-
- - ##### This project uses Python, Flask, Chrome and Chromedrvier. Go check them out if you don't have them locally installed.
-
- - **Install Flask**
-
- Open a terminal, make a new folder to store the project. Let's call this folder **autobook**.
-
- If you are using Python 3.6, enter **autobook** and create a virtual environment.
-
- ```shell
- python3 -m venv flask
- ```
-
- Type these commands one by one to install Flask and its extension.
-
- ```shell
- flask/bin/pip install flask
- flask/bin/pip install flask-login
- flask/bin/pip install flask-openid
- flask/bin/pip install flask-mail
- flask/bin/pip install flask-sqlalchemy
- flask/bin/pip install sqlalchemy-migrate
- flask/bin/pip install flask-whooshalchemy
- flask/bin/pip install flask-wtf
- flask/bin/pip install flask-babel
- flask/bin/pip install guess_language
- flask/bin/pip install flipflop
- flask/bin/pip install coverage
- ```
-
- - **Install Chrome**
-
- ```shell
- yum -y install google-chrome-stable
- ```
-
- - **Install Chromedriver**
-
- The version of Chromedriver should be consistent with your Chrome's. If you don't know your Chrome's version, try to type this command to check out.
-
- ```shell
- google-chrome --version
- ```
-
- Go to this address to find a matching version of Chrome.
-
- http://chromedriver.storage.googleapis.com/index.html
-
- You could download the .zip file to your PC, transfer to your cloud host via Xftp or something else, and unzip it later.
-
- Or you might use this command.
-
- ```shell
- wget https://npm.taobao.org/mirrors/chromedriver/83.0.4103.14/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- ```
-
- Just to make sure everything goes well, you might as well type this to avoid possible permission problem.
-
- ```shell
- chmod a+x chromedriver
- ```
-
- - **Other necessary Python modules**
-
- Use Pip to install some essential modules.
-
- ```shell
- pip3 install pyvirtualdisplay
- pip3 install selenium
- pip3 install PyEmail
- pip3 install gevent
- ```
-
-
-
- ### Usage
-
- - ##### Deploy
-
- Determine run.py as an executable file.
-
- ```shell
- chmod a+x run.py
- ```
-
- Run as follows.
-
- ```shell
- ./run.py
- ```
-
- - ##### Customer use
-
- Visit the website:
-
- http://127.0.0.1:5000/
-
- ![login page](http://gitea.shuishan.net.cn/10195501441/Library_Auto_Seats_Pick/src/branch/master/img-folder/login.png)
-
- ![success page](http://gitea.shuishan.net.cn/10195501441/Library_Auto_Seats_Pick/src/branch/master/img-folder/success.png)
-
- ### Maintainers
-
- [@Young Hojan](http://gitea.shuishan.net.cn/10195501441)
-
-
-
- ### License
-
- [MIT](http://gitea.shuishan.net.cn/10195501441/Library_Auto_Seats_Pick/src/branch/master/LICENSE.md) © Young Hojan
-
-
-
|