File size: 1,708 Bytes
0aee47a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
  "info": {
    "check_cookies": {
      "url": "https://passport.bilibili.com/x/passport-login/web/cookie/info",
      "method": "GET",
      "verify": true,
      "comment": "检查是否需要刷新 Cookie"
    },
    "valid": {
      "url": "https://api.bilibili.com/x/web-interface/nav",
      "method": "GET",
      "verify": false,
      "ignore_code": true,
      "comment": "(本质作用为获取 cookies 信息)如果 code = 0 则 cookies 有效"
    },
    "spi": {
      "url": "https://api.bilibili.com/x/frontend/finger/spi",
      "method": "GET",
      "verify": false,
      "comment": "获取 buvid3 / buvid4"
    }
  },
  "operate": {
    "get_refresh_csrf": {
      "url": "https://www.bilibili.com/correspond/1/{correspondPath}",
      "method": "GET",
      "verify": true,
      "comment": "获取刷新 CSRF,记得替换 correspondPath"
    },
    "refresh_cookies": {
      "url": "https://passport.bilibili.com/x/passport-login/web/cookie/refresh",
      "method": "POST",
      "verify": true,
      "data": {
        "refresh_csrf": "refresh_csrf",
        "csrf": "Cookie 中的 bili_jct 字段",
        "source": "main_web",
        "refresh_token": "Cookie 中的 ac_time_value 字段"
      },
      "comment": "刷新 Cookies"
    },
    "confirm_refresh": {
      "url": "https://passport.bilibili.com/x/passport-login/web/confirm/refresh",
      "method": "POST",
      "verify": true,
      "data": {
        "csrf": "从新的 cookie 中获取",
        "refresh_token": "在刷新前 localStorage 中的ac_time_value获取,并非刷新后返回的值"
      },
      "comment": "确认刷新"
    }
  }
}