feat: 各种接口补充与错误修正 (#1066)
* fix(video/collection.md): unclosed xml tags * feat(video/report.md): uuid not really random * feat: b23.tv short link * feat: login/moral/exp log * feat: v_voucher * feat: upload video cover & post * feat(creativecenter/upload.md): upload octet-stream * feat(creativecenter/upload.md): update some notes * feat(clientinfo/ip.md): another from live * feat: live web heartbeat * feat: update popular series & precious * fix(creativecenter/upload.md): mistakes in example * feat: merge duplicate fav info * feat(README.md): missing link to webmask * feat(search/hot.md): word_type * feat(login/login_action): recovery old api * feat(video/collection.md): series operation * feat: video season operation * feat: add & mod some links * feat(search/suggest.md): up to date * feat: web home header image * feat(misc/sign/bili_ticket.md): demo for nodejs * feat(creativecenter/upload.md): x-upos-auth validity period * feat: add referer & buvid3 to request header * feat: customer service message heartbeat & upload * feat(customerservice/msg.md): upload code 1200201 * feat(video/report.md): click/web/h5 * feat(video/report.md): view count desc * feat: laser2 * feat: wbi_key in bili_ticket * fix: typo & unclosed XML tags * feat(misc/sign/v_voucher): cookie x-bili-gaia-vtoken * feat(search/hot.md): square * feat(video/status_number.md): fold archive_stat/stat * feat(fav/info.md): resource/infos invalid type 21 * feat: /x/activity/subject/info * feat: lottery * feat(docs/misc/b23.tv): remove some unnecessary fields * feat(creativecenter/upload.md): types/predict * fix(video/collection.md): invalid end tag * feat: app version upgrade * feat(creativecenter/upload.md): tag/recommend #528 * feat(user/status_number.md): navnum * feat: /x/activity/page/list * feat(comment/list.md): desc about pagination_str * feat(comment/list.md): update example * feat(dynamic/all.md): #1082 * fix(comment/list.md): -352 not -412 * feat: #700 * feat(video/video_stream.md): #606 & cv949156 * feat(message/private_msg.md): single_unread freq * feat: getUserWallet * fix: broken form * feat(Layout.vue): copyright to 2024 * feat: /x/topic/pub/rcmd/search * feat: #425 * feat(misc/time_stamp.md): rtc/getTimestamp * fix(misc/time_stamp.md): missing end tag * feat: #745 * feat(dynamic/all.md): update feed/all * feat(danmaku/action.md): #220 * feat(live/info.md): gethistory from cv8186413 * fix(danmaku/action.md): missing end tag
This commit is contained in:
@@ -12,11 +12,26 @@
|
||||
|
||||
**url参数:**
|
||||
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| --------- | ---- | ---------------------- | ------ | ------------------------ |
|
||||
| term | str | 需要获得建议的输入内容 | 必要 | |
|
||||
| main_ver | str | v1 | 非必要 | 固定为`v1` |
|
||||
| highlight | str | 任意 | 非必要 | 有此项开启关键词高亮标签 |
|
||||
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
||||
| --------------- | ---- | ---------------------- | ------ | ------------------------ |
|
||||
| term | str | 需要获得建议的输入内容 | 必要 | |
|
||||
| main_ver | str | v1 | 非必要 | 默认为 `v1` |
|
||||
| highlight | str | 任意, 无明显作用 | 非必要 | 默认为空 |
|
||||
| func | str | 函数? | 非必要 | 默认为 `suggest` |
|
||||
| suggest_type | str | 建议类型? | 非必要 | 默认为 `accurate` |
|
||||
| sub_type | str | 子类型? | 非必要 | 默认为 `tag` |
|
||||
| userid | num | 本用户 mid | 非必要 | 可能用于个性化推荐 |
|
||||
| bangumi_acc_num | num | 番剧累积数? | 非必要 | 默认为 `1` |
|
||||
| special_acc_num | num | 特殊累积数? | 非必要 | 默认为 `1` |
|
||||
| topic_acc_num | num | 话题累积数? | 非必要 | 默认为 `1` |
|
||||
| upuser_acc_num | num | UP主累积数? | 非必要 | 默认为 `1` |
|
||||
| tag_num | num | Tag 数? | 非必要 | 默认为 `10` |
|
||||
| special_num | num | 特殊推荐数? | 非必要 | 默认为 `10` |
|
||||
| bangumi_num | num | 番剧推荐数? | 非必要 | 默认为 `10` |
|
||||
| upuser_num | num | UP主推荐数? | 非必要 | 默认为 `3` |
|
||||
| rnd | num | 一个随机浮点数 | 非必要 | 由 `Math.random()` 生成? |
|
||||
| buvid | str | 同 Cookie 中 buvid3 | 非必要 | |
|
||||
| spmid | str | 333.1007 | 非必要 | |
|
||||
|
||||
**json回复:**
|
||||
|
||||
@@ -24,27 +39,11 @@
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----------- | ---- | ------------ | ------------ |
|
||||
| exp_str | str | 实验字符串? | 作用尚不明确 |
|
||||
| code | num | 返回值 | 0:成功 |
|
||||
| cost | obj | 详细搜索用时 | 大概是吧? |
|
||||
| result | obj | 搜索建议结果 | |
|
||||
| page caches | obj | ??? | 作用尚不明确 |
|
||||
| sengine | obj | ??? | 作用尚不明确 |
|
||||
| stoken | str | ??? | 作用尚不明确 |
|
||||
|
||||
`cost`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----- | ---- | -------- | ---- |
|
||||
| about | obj | 套了个娃 | |
|
||||
|
||||
`cost`中的`about`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ------------ | ---- | ---- | ---- |
|
||||
| params_check | str | | |
|
||||
| total | str | | |
|
||||
| main_handler | str | | |
|
||||
|
||||
`result`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
@@ -61,120 +60,115 @@
|
||||
|
||||
`tag`数组中的对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----- | ---- | ---------- | ------------------------------------------------------------ |
|
||||
| value | str | 关键词内容 | |
|
||||
| ref | num | 0 | 作用尚不明确 |
|
||||
| name | str | 显示内容 | 在无高亮显示时与`value`相同<br />有高亮显示时带有`<em class="suggest_high_light">`的xml标签 |
|
||||
| spid | num | ??? | 作用尚不明确 |
|
||||
|
||||
`page caches`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ---------- | ---- | ---- | ------------ |
|
||||
| save cache | str | no | 作用尚不明确 |
|
||||
|
||||
`sengine`对象:
|
||||
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----- | ---- | ---- | ------------ |
|
||||
| usage | num | 0 | 作用尚不明确 |
|
||||
| 字段 | 类型 | 内容 | 备注 |
|
||||
| ----- | ---- | ---------- | -------------------------------------------------- |
|
||||
| value | str | 关键词内容 | |
|
||||
| ref | num | 0 | 作用尚不明确 |
|
||||
| name | str | 显示内容 | 带有 `<em class="suggest_high_light">` 的 XML 标签 |
|
||||
| spid | num | 5 | 作用尚不明确 |
|
||||
| type | str | 空 | |
|
||||
|
||||
**示例:**
|
||||
|
||||
获取关于`lei`的搜索建议,关键词带有高亮
|
||||
获取关于 `洛天依` 的搜索建议
|
||||
|
||||
```shell
|
||||
curl -G 'https://s.search.bilibili.com/main/suggest' \
|
||||
--data-urlencode 'term=lei' \
|
||||
--data-urlencode 'main_ver=v1' \
|
||||
--data-urlencode 'highlight='
|
||||
--data-urlencode 'term=洛天依'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>查看响应示例:</summary>
|
||||
<summary>查看响应示例:</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"cost": {
|
||||
"about": {
|
||||
"params_check": "0.000103",
|
||||
"total": "0.011644",
|
||||
"main_handler": "0.011472"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"tag": [
|
||||
{
|
||||
"value": "雷军",
|
||||
"ref": 0,
|
||||
"name": "雷军",
|
||||
"spid": 1
|
||||
},
|
||||
{
|
||||
"value": "雷之律者",
|
||||
"ref": 0,
|
||||
"name": "雷之律者",
|
||||
"spid": 5
|
||||
},
|
||||
{
|
||||
"value": "LEI神",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">LEI</em>神",
|
||||
"spid": 5
|
||||
},
|
||||
{
|
||||
"value": "LEIGH ELLEXSON",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">LEI</em>GH ELLEXSON",
|
||||
"spid": 5
|
||||
},
|
||||
{
|
||||
"value": "LEICA Q2",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">LEI</em>CA Q2",
|
||||
"spid": 5
|
||||
},
|
||||
{
|
||||
"value": "LEIGHANNE",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">LEI</em>GHANNE",
|
||||
"spid": 0
|
||||
},
|
||||
{
|
||||
"value": "雷达探测姬",
|
||||
"ref": 0,
|
||||
"name": "雷达探测姬",
|
||||
"spid": 5
|
||||
},
|
||||
{
|
||||
"value": "雷律",
|
||||
"ref": 0,
|
||||
"name": "雷律",
|
||||
"spid": 5
|
||||
},
|
||||
{
|
||||
"value": "雷霆嘎巴",
|
||||
"ref": 0,
|
||||
"name": "雷霆嘎巴",
|
||||
"spid": 5
|
||||
},
|
||||
{
|
||||
"value": "雷霆沙赞",
|
||||
"ref": 0,
|
||||
"name": "雷霆沙赞",
|
||||
"spid": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"page caches": {
|
||||
"save cache": "no"
|
||||
},
|
||||
"sengine": {
|
||||
"usage": 0
|
||||
},
|
||||
"stoken": "12344377692164099019"
|
||||
"exp_str": "106301_106700",
|
||||
"code": 0,
|
||||
"result": {
|
||||
"tag": [
|
||||
{
|
||||
"value": "洛天依",
|
||||
"term": "洛天依",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依十二周年",
|
||||
"term": "洛天依十二周年",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>十二周年",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依演唱会",
|
||||
"term": "洛天依演唱会",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>演唱会",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依手办",
|
||||
"term": "洛天依手办",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>手办",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依歌曲",
|
||||
"term": "洛天依歌曲",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>歌曲",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依童话镇",
|
||||
"term": "洛天依童话镇",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>童话镇",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依东京不太热",
|
||||
"term": "洛天依东京不太热",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>东京不太热",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依霜雪千年",
|
||||
"term": "洛天依霜雪千年",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>霜雪千年",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依生日会",
|
||||
"term": "洛天依生日会",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>生日会",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
},
|
||||
{
|
||||
"value": "洛天依生日",
|
||||
"term": "洛天依生日",
|
||||
"ref": 0,
|
||||
"name": "<em class=\"suggest_high_light\">洛天依</em>生日",
|
||||
"spid": 5,
|
||||
"type": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"stoken": "4020133863501304726"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user