luogu-info 实时显示洛谷咕值并生成小徽章(Shields)
  • 板块灌水区
  • 楼主RainbowBird
  • 当前回复34
  • 已保存回复34
  • 发布时间2020/7/22 17:13
  • 上次更新2023/11/6 22:34:56
查看原帖
luogu-info 实时显示洛谷咕值并生成小徽章(Shields)
312639
RainbowBird楼主2020/7/22 17:13

萌新的第一个NodeJS项目QAQ

代码写的很烂x

Github仓库


Luogu Info

用于获取洛谷用户信息并实时生成小徽章(Shields)

需要提前安装nodeJS软件(要求版本10.0及以上)

支持的用法

  • 洛谷咕值
  • 通过题目(可以设置目标)
  • 访客统计

TODO

  • 支持洛谷登录
  • 可能会提供服务器?
  • 添加新功能,如:提交/通过数量,AC率...

目前仅支持使用cookie的方式来获取个人数据

效果图

洛谷咕值

通过题目

使用方法

npm update
git clone https://github.com/rain15z3/luogu-info.git
cd luogu-info/
node . 98 123456 abcdefghi # 端口号 uid client_id

其中,uidclient_id都可以在网站的Cookie里面找到

以Chrome为例,进入Dev Tools后可以找到

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  # 黑题
2020/7/22 17:13
加载中...