This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
apiHelp
Hoshino Tented edited this page Jul 31, 2019
·
3 revisions
对于 GET
的API, 需要拥有以下 Cookie
:
- __client_id: 客户端的唯一凭证
- _uid: 新增的不知作用的字段, 一般为
__client_id
对应用户的 uid
对于 POST
的API, 除了需要 GET
所需要的之外, 还需要拥有以下 Cookie
:
- referer: 调用API所在的页面
- x-csrf-token:
OAuth
的csrf-token
, 可以在 你谷 首页的<head>
获取到
对于洛谷新界面(比如题目界面,评测界面 (小心封禁))
可以在 URL 后添加 _contentOnly=1
或在 header
中添加 x-luogu-type=content-only
可以获取 json
格式的数据,方便解析
org.hoshino9.luogu
org.hoshino9.luogu.user
org.hoshino9.luogu.data
org.hoshino9.luogu.tag
org.hoshino9.luogu.benben
org.hoshino9.luogu.results
org.hoshino9.luogu.training
org.hoshino9.luogu.utils
org.hoshino9.luogu.photo
org.hoshino9.luogu.problem
org.hoshino9.luogu.problem.tags
org.hoshino9.luogu.paste
org.hoshino9.luogu.record
org.hoshino9.luogu.record.response
org.hoshino9.luogu.record.status
org.hoshino9.luogu.record.listener