萌新的第一个NodeJS项目QAQ
代码写的很烂x
用于获取洛谷用户信息并实时生成小徽章(Shields)
需要提前安装nodeJS
软件(要求版本10.0及以上)
支持的用法
TODO
目前仅支持使用cookie的方式来获取个人数据
npm update
git clone https://github.com/rain15z3/luogu-info.git
cd luogu-info/
node . 98 123456 abcdefghi # 端口号 uid client_id
其中,uid
和client_id
都可以在网站的Cookie里面找到
以Chrome为例,进入Dev Tools后可以找到
http://localhost:98/gen?query=rating # 总咕值
http://localhost:98/gen?query=basicRating # 基础信用
http://localhost:98/gen?query=practiceRating # 练习情况
http://localhost:98/gen?query=socialRating # 社区贡献
http://localhost:98/gen?query=contestRating # 比赛情况
http://localhost:98/gen?query=prizeRating # 获得成就
http://localhost:98/gen?query=visitor # 总访客数
# to表示目标数量,达到目标后颜色会变成绿色
http://localhost:98/gen?query=problem0 # 未评定
http://localhost:98/gen?query=problem1&to=50 # 红题
http://localhost:98/gen?query=problem2&to=50 # 橙题
http://localhost:98/gen?query=problem3&to=50 # 黄题
http://localhost:98/gen?query=problem4&to=20 # 绿题
http://localhost:98/gen?query=problem5&to=20 # 蓝题
http://localhost:98/gen?query=problem6&to=5 # 紫题
http://localhost:98/gen?query=problem7&to=1 # 黑题