forked from SocialSisterYi/bilibili-API-collect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bili_ticket 算法 Java 实现 及 信息补充 及 错误修正 (SocialSisterYi#1061)
* feat: 空间头图及拼写错误修正 * feat(fav/info.md): code 11010 * fix(misc/sign/wbi.md): java extra params * feat(misc/sign/bili_ticket.md): description and java demo * feat(video_ranking/dynamic.md): 分区视频相关接口 * fix(video_ranking/dynamic.md): 未关闭的标签 * feat(README.md): 补充链接 * feat(clientinfo/ip.md): 查询任意 IP 地址的归属地 * feat: get buvid3 buvid4 from api * feat: new error code & format * feat(misc/picture.md): 图片格式化更多规则
- Loading branch information
Showing
14 changed files
with
1,078 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# 获取 buvid3 / buvid4 | ||
|
||
## 游客获取 buvid3 / buvid4 | ||
|
||
> https://api.bilibili.com/x/frontend/finger/spi | ||
*请求方式: GET* | ||
|
||
**JSON回复:** | ||
|
||
根对象: | ||
|
||
| 字段 | 类型 | 内容 | 备注 | | ||
| ------- | ---- | -------- | -------- | | ||
| code | num | 返回值 | 0:成功 | | ||
| message | str | 信息 | ok: 成功 | | ||
| data | obj | 数据本体 | | | ||
|
||
`data`对象: | ||
|
||
| 字段 | 类型 | 内容 | 备注 | | ||
| ---- | ---- | ------ | ---- | | ||
| b_3 | str | buvid3 | 需手动存放至 cookie 中 | | ||
| b_4 | str | buvid4 | 同上 | | ||
|
||
**示例:** | ||
|
||
注: 建议自行生成, 不要复制本处示例的 buvid3 / buvid4. | ||
|
||
```shell | ||
curl -G 'https://api.bilibili.com/x/frontend/finger/spi' | ||
``` | ||
|
||
<details> | ||
<summary>查看响应示例:</summary> | ||
|
||
```json | ||
{ | ||
"code": 0, | ||
"data": { | ||
"b_3": "D9656DA8-9BEF-F464-5B72-C4849AFD336379044infoc", | ||
"b_4": "F6E0FD4B-520C-1902-4F7B-E461D8D1F5AB79044-024072309-666onEZSnlHVPjoRp4kDYg==" | ||
}, | ||
"message": "ok" | ||
} | ||
``` | ||
|
||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
# 图片格式化 | ||
|
||
对于\*.hdslb.com/bfs下的图片文件都可以使用以下格式化参数 | ||
对于 `*.hdslb.com/bfs` 下的图片文件都可以使用以下可选格式化参数. | ||
|
||
> \*.hdslb.com/bfs/\*/\*.\[jpg/png/gif\]@{width}w\_{high}h\_{quality}q.{format} | ||
使用 `@` 开始参数 (无论格式如何, 无论是否有参数, 通过计算 HASH 发现, 使用 `@` 均会导致返回图片不同), 多个参数以 `_` 分隔, 图片格式无需分隔且必须放在最后 | ||
|
||
| 可选参数 | 含义 | 备注 | | ||
| -------- | ---------------- | ---------------- | | ||
| width | 图片最大限制宽度 | | | ||
| high | 图片最大限制高度 | | | ||
| quality | 图片质量百分比 | 仅限webp | | ||
| format | 图片格式 | 仅限png/jpg/webp/[avg_color](#avg_color格式说明) | | ||
参见: [#191](https://github.com/SocialSisterYi/bilibili-API-collect/issues/191) | ||
|
||
注: jpg 即 jpeg, 二者等效. 网页端常用 AVIF, WebP. | ||
|
||
| 参数 | 格式 | 含义 | 备注 | | ||
| ---- | ------- | ---------------- | ---------------- | | ||
| w | ${int}w | 图片最大限制宽度 | 范围 [1, 9223372036854775807] | | ||
| h | ${int}h | 图片最大限制高度 | 范围 [1, 9223372036854775807] | | ||
| s | ${int}s | 作用尚不明确 | 不影响输出结果, 范围 [1, 9223372036854775807] | | ||
| e | ${int}e | 改变大小 | 0: 保留比例取其小, 1: 保留比例取其大, 2: 不保留原比例 | | ||
| p | ${int}p | 缩放倍数 | 默认100, 范围 [1, 1000] | | ||
| o | ${int}o | 作用尚不明确 | 不影响输出结果 范围 [0, 1] | | ||
| q | ${int}q | 图片质量百分比 | 仅限webp/jpeg/avif | | ||
| c | ${int}c | 裁切图片(如果宽高允许) | 0: 不裁切但会修改图片, 1: 上传时的预设规则(若无则右下), 2: 左上, 3: 右上 | | ||
| f | ${int}f | 作用尚不明确 | [0, 1]: 不改变图片, 2: 会改变图片 | | ||
| progressive | progressive | 图片编码方式 | 仅限 jpeg(无: baseline, 有: progressive)/png(无:non-interlaced, 有: interlaced) | | ||
| ! | !${str} | 加载来源 | web-home-carousel-cover, header, web-dynamic, web-avatar-space-header, ... | | ||
| . | .${str} | 图片格式 | 仅限 png/jpeg/webp/avif/[avg_color](#avg_color格式说明) | | ||
|
||
**示例:** | ||
|
||
<details> | ||
<summary>查看示例:</summary> | ||
|
||
原始图片 | ||
|
||
https://i1.hdslb.com/bfs/archive/e5fff1472bad1c0c6bcb3004205f9be23b58ffc0.jpg | ||
|
@@ -43,6 +58,7 @@ https://i1.hdslb.com/bfs/archive/e5fff1472bad1c0c6bcb3004205f9be23b58ffc0.jpg@1q | |
|
||
![](https://i1.hdslb.com/bfs/archive/[email protected]) | ||
|
||
</details> | ||
|
||
## avg_color格式说明 | ||
|
||
|
Oops, something went wrong.