Files
Bilibili-gadget/bilibili-API-collect-master/docs/user/contract.md
T
mckero 8db1d171a0 feat: 重大优化更新 - 修复v14.0并发布Pro版
✨ 新功能:
- 创建bilibili_audio_downloader_pro.py (Pro版) - 全新架构重构
- 添加config.json配置文件支持
- 新增INSTALL.md详细安装指南
- 新增VERSION_COMPARISON.md版本对比说明

🐛 Bug修复 (v14.0):
- 修复中文编码显示问题
- 修复ffmpeg进度条计算不准确
- 改进yt-dlp下载进度解析
- 添加重试机制和超时设置
- 完善错误处理和日志记录

🏗️ Pro版优势:
- 面向对象架构设计,代码更清晰
- 自定义异常类和智能错误恢复
- 准确的进度条显示算法
- 完整的日志系统
- 灵活的配置管理
- 更好的用户体验

📚 文档更新:
- 更新README.md,添加版本对比指引
- 更新requirements.txt依赖列表
- 完善项目文档结构
2025-09-21 12:02:11 +08:00

132 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 加入老粉计划
> https://api.bilibili.com/x/v1/contract/add_contract
*请求方式:POST*
是否需要登录:`是`
认证方式:Cookie(SESSDATA)
**正文参数 (application/x-www-form-urlencoded):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|----------|-----|--------|-----|-----|
| aid | str | `空串` | | |
| up_mid | str | UP主UID | 必要 | |
| source | str | `4` | | |
| scene | str | `105` | | |
| platform | str | `web` | | |
| mobi_app | str | `pc` | | |
| csrf | str | 用户csrf | 必要 | |
**json回复:**
根对象:
| 字段名 | 类型 | 内容 | 备注 |
|---------|-----|------|-------------------------|
| code | num | 响应码 | 0:成功<br/>158001:`不满足条件` |
| message | str | 0 | |
| ttl | num | 1 | |
| data | obj | 信息本体 | |
`data`对象
| 字段名 | 类型 | 内容 | 备注 |
|---------------|------|-----------------------------------|-----|
| allow_message | bool | `true` | |
| input_text | str | `UP主加油!看好你噢~` | |
| input_title | str | `感谢你对UP主的特别支持,“老粉”可期!私信留言鼓励下TA吧~ ` | |
**示例:**
```shell
curl --location --request POST 'https://api.bilibili.com/x/v1/contract/add_contract' \
--header 'Cookie: SESSDATA=xxx' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'up_mid=2' \
--data-urlencode 'csrf=xxx'
```
<details>
<summary>点击查看</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"allow_message": true,
"input_text": "UP主加油!看好你噢~",
"input_title": "感谢你对UP主的特别支持,“老粉”可期!私信留言鼓励下TA吧~"
}
}
```
</details>
# 老粉计划发送留言
> https://api.bilibili.com/x/v1/contract/add_message
*请求方式:POST*
认证方式:Cookie (SESSDATA)
**正文参数 (application/x-www-form-urlencoded):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|---------|-----|--------|-----|-----|
| aid | str | `空串` | | |
| up_mid | str | UP主UID | 必要 | |
| source | str | `4` | | |
| scene | str | `105` | | |
| content | str | 留言内容 | 必要 | |
| csrf | str | 用户csrf | 必要 | |
**json回复:**
根对象:
| 字段名 | 类型 | 内容 | 备注 |
|---------|-----|------|------------------------------|
| code | num | 响应码 | 0:成功<br/>158005:您跟up主还不是契约关系 |
| message | str | 0 | |
| ttl | num | 1 | |
| data | obj | 信息本体 | |
`data`对象
| 字段名 | 类型 | 内容 | 备注 |
|---------------|-----|------------------|-----|
| success_toast | str | `提交成功,UP主已收到留言~` | |
**示例:**
```shell
curl --location --request POST 'https://api.bilibili.com/x/v1/contract/add_message' \
--header 'Cookie: SESSDATA=xxx' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'up_mid=2' \
--data-urlencode 'content=..' \
--data-urlencode 'csrf=xxx'
```
<details>
<summary>点击查看</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"success_toast": "提交成功,UP主已收到留言~"
}
}
```
</details>