- python flask 后端 -- 提供用户注册以及LeetCode账户验证服务
- python 脚本 -- 提供LeetCode网站数据爬取服务
- SpringBoot 后端 -- 提供Web APP各项功能
- MySQL & mybatis -- 存储数据
- Thymeleaf & Bootstrap & Charts & Editor
- Jquery & AJAX
- python后端
Flask==2.2.2
requests==2.22.0
- SpringBoot 后端
jdk 1.8 maven git
- 数据库
MySQL
./src/main/resources/sql/create_database.sql
windows: javaw -jar xxx.jar
linux: nohup java -jar xxx.jar >> log.txt &
./src/main/resources/leetcode-shell/leethub.py
./src/main/resources/leetcode-shell/leethub_users.json
./src/main/resources/leetcode-shell/lastRecordTime.json
linux:
export FLASK_APP=leethub.py
nohup flask run --host=0.0.0.0 >> spider_log.txt &
./src/main/resources/leetcode-shell/*
sudo vim /etc/crontab
1 0 * * * user python3 ./leetcode-shell/getDailyProblem.py >> ./leetcode-shell/log.txt
10 1 * * * user python3 ./leetcode-shell/getLeetCodeRank.py >> ./leetcode-shell/log.txt
0 0,7-23/1 * * * user python3 ./leetcode-shell/getRecordAndCount.py >> ./leetcode-shell/log.txt
每天0点1分爬取每日一题,1点10分爬取排名,上午7点到晚上0点整点爬取做题记录以及积分信息。