社区讨论

luogu-info 实时显示洛谷咕值并生成小徽章(Shields)

灌水区参与者 23已保存回复 34

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
34 条
当前快照
1 份
快照标识符
@lodiucuk
此快照首次捕获于
2023/10/31 07:18
2 年前
此快照最后确认于
2023/11/06 22:34
2 年前
查看原帖
萌新的第一个NodeJS项目QAQ
代码写的很烂x

Luogu Info

用于获取洛谷用户信息并实时生成小徽章(Shields)
需要提前安装nodeJS软件(要求版本10.0及以上)
支持的用法
  • 洛谷咕值
  • 通过题目(可以设置目标)
  • 访客统计
TODO
  • 支持洛谷登录
  • 可能会提供服务器?
  • 添加新功能,如:提交/通过数量,AC率...
目前仅支持使用cookie的方式来获取个人数据

效果图

洛谷咕值
通过题目

使用方法

BASH
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

接口

CPP
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     # 获得成就
CPP
http://localhost:98/gen?query=visitor         # 总访客数
CPP
# 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  # 黑题

回复

34 条回复,欢迎继续交流。

正在加载回复...