Skip to content

archibate/dotfiles-opencode / skills/bilibili-api

bilibili-api

Flagged

This skill should be used when the user asks to "use bilibili API", "download bilibili video", "get bilibili user info", "list bilibili favorites", "send bilibili danmaku", "upload video to bilibili", "monitor bilibili live room", "search bilibili", "get bilibili comments", or needs guidance on the bilibili_api Python library usage, authentication, API endpoints, or workflow patterns.

FileKindSize
SKILL.mdskill md8.3 KB
references/api-modules.mdmarkdown6.4 KB
references/common-patterns.mdmarkdown8.6 KB
references/configuration.mdmarkdown4.8 KB
references/credential-setup.mdmarkdown6.1 KB
references/docs/.gitignoreother13 B
references/docs/.nojekyllother0 B
references/docs/DEPLOY_LOCALHOST.mdmarkdown310 B
references/docs/README.mdmarkdown9.9 KB
references/docs/_sidebar.mdmarkdown4.7 KB
references/docs/b23tv.mdmarkdown448 B
references/docs/configuration.mdmarkdown4.3 KB
references/docs/examples/activity.mdmarkdown960 B
references/docs/examples/app.mdmarkdown127 B
references/docs/examples/article.mdmarkdown918 B
references/docs/examples/article_category.mdmarkdown648 B
references/docs/examples/ass.mdmarkdown727 B
references/docs/examples/audio.mdmarkdown1.8 KB
references/docs/examples/audio_uploader.mdmarkdown975 B
references/docs/examples/bangumi.mdmarkdown3.8 KB
references/docs/examples/black_room.mdmarkdown350 B
references/docs/examples/channel_series.mdmarkdown787 B
references/docs/examples/cheese.mdmarkdown152 B
references/docs/examples/client.mdmarkdown183 B
references/docs/examples/comment.mdmarkdown2.2 KB
references/docs/examples/creative_center.mdmarkdown288 B
references/docs/examples/dynamic.mdmarkdown2.0 KB
references/docs/examples/emoji.mdmarkdown802 B
references/docs/examples/favorite_list.mdmarkdown406 B
references/docs/examples/festival.mdmarkdown3.0 KB
references/docs/examples/game.mdmarkdown1.4 KB
references/docs/examples/garb.mdmarkdown3.2 KB
references/docs/examples/homepage.mdmarkdown127 B
references/docs/examples/hot.mdmarkdown263 B
references/docs/examples/interactive_video.mdmarkdown7.9 KB
references/docs/examples/live.mdmarkdown4.0 KB
references/docs/examples/live_area.mdmarkdown349 B
references/docs/examples/login_v2.mdmarkdown5.1 KB
references/docs/examples/manga.mdmarkdown1.2 KB
references/docs/examples/music.mdmarkdown727 B
references/docs/examples/note.mdmarkdown355 B
references/docs/examples/opus.mdmarkdown1.9 KB
references/docs/examples/rank.mdmarkdown122 B
references/docs/examples/search.mdmarkdown1.3 KB
references/docs/examples/session.mdmarkdown778 B
references/docs/examples/show.mdmarkdown255 B
references/docs/examples/topic.mdmarkdown159 B
references/docs/examples/user.mdmarkdown2.5 KB
references/docs/examples/video.mdmarkdown3.8 KB
references/docs/examples/video_tag.mdmarkdown174 B
references/docs/examples/video_uploader.mdmarkdown2.0 KB
references/docs/examples/video_zone.mdmarkdown279 B
references/docs/examples/vote.mdmarkdown133 B
references/docs/examples/watchroom.mdmarkdown662 B
references/docs/get-credential.mdmarkdown3.2 KB
references/docs/history.htmlother1.5 KB
references/docs/history.mdmarkdown123 B
references/docs/index.htmlother2.2 KB
references/docs/ivifile.mdmarkdown3.9 KB
references/docs/logo-small.pngbinary12.2 KB
references/docs/logo.pngbinary88.6 KB
references/docs/modules/README.mdmarkdown432 B
references/docs/modules/activity.mdmarkdown1.0 KB
references/docs/modules/app.mdmarkdown1.3 KB
references/docs/modules/article.mdmarkdown4.8 KB
references/docs/modules/article_category.mdmarkdown2.1 KB
references/docs/modules/ass.mdmarkdown8.2 KB
references/docs/modules/audio.mdmarkdown3.2 KB
references/docs/modules/audio_uploader.mdmarkdown7.5 KB
references/docs/modules/bangumi.mdmarkdown23.6 KB
references/docs/modules/bilibili_api.mdmarkdown38.4 KB
references/docs/modules/black_room.mdmarkdown6.1 KB
references/docs/modules/channel_series.mdmarkdown4.4 KB
references/docs/modules/cheese.mdmarkdown7.3 KB
references/docs/modules/client.mdmarkdown508 B
references/docs/modules/comment.mdmarkdown7.2 KB
references/docs/modules/creative_center.mdmarkdown14.1 KB
references/docs/modules/dynamic.mdmarkdown13.9 KB
references/docs/modules/emoji.mdmarkdown1.6 KB
references/docs/modules/favorite_list.mdmarkdown10.2 KB
references/docs/modules/festival.mdmarkdown771 B
references/docs/modules/game.mdmarkdown3.1 KB
references/docs/modules/garb.mdmarkdown5.8 KB
references/docs/modules/homepage.mdmarkdown2.2 KB
references/docs/modules/hot.mdmarkdown1.6 KB
references/docs/modules/interactive_video.mdmarkdown13.3 KB
references/docs/modules/live.mdmarkdown20.2 KB
references/docs/modules/live_area.mdmarkdown2.2 KB
references/docs/modules/login_v2.mdmarkdown6.0 KB
references/docs/modules/manga.mdmarkdown4.0 KB
references/docs/modules/music.mdmarkdown3.5 KB
references/docs/modules/note.mdmarkdown4.3 KB
references/docs/modules/opus.mdmarkdown3.3 KB
references/docs/modules/rank.mdmarkdown6.8 KB
references/docs/modules/search.mdmarkdown5.9 KB
references/docs/modules/session.mdmarkdown6.9 KB
references/docs/modules/show.mdmarkdown3.2 KB
references/docs/modules/topic.mdmarkdown2.7 KB
references/docs/modules/user.mdmarkdown25.9 KB
references/docs/modules/video.mdmarkdown28.4 KB
references/docs/modules/video_tag.mdmarkdown1.7 KB
references/docs/modules/video_uploader.mdmarkdown9.9 KB
references/docs/modules/video_zone.mdmarkdown6.8 KB
references/docs/modules/vote.mdmarkdown3.2 KB
references/docs/modules/watchroom.mdmarkdown4.4 KB
references/docs/package-lock.jsonmanifest125.8 KB
references/docs/refresh_cookies.mdmarkdown674 B
references/docs/request_client.mdmarkdown11.1 KB
references/docs/search.jsscript6.4 KB
references/docs/sync-executor.mdmarkdown471 B
references/docs/target/npmlist.jsonconfig268 B
references/docs/theme.cssother15.4 KB
references/docs/vote_id.mdmarkdown2.0 KB
references/docs/vote_source.pngbinary41.8 KB
references/live-guide.mdmarkdown5.1 KB
references/self-update.mdmarkdown5.4 KB
references/upload-guide.mdmarkdown5.9 KB
references/user-guide.mdmarkdown4.7 KB
references/video-guide.mdmarkdown6.0 KB
scripts/credential_check.pyscript3.0 KB
scripts/quickstart.pyscript1.2 KB

references/docs/modules/live.md

View on GitHub
# Module live.py


bilibili_api.live

直播相关


``` python
from bilibili_api import live
```

- [class LiveCodec()](#class-LiveCodec)
- [class LiveDanmaku()](#class-LiveDanmaku)
  - [def \_\_init\_\_()](#def-\_\_init\_\_)
  - [async def connect()](#async-def-connect)
  - [async def disconnect()](#async-def-disconnect)
  - [def get\_live\_room()](#def-get\_live\_room)
  - [def get\_status()](#def-get\_status)
- [class LiveFormat()](#class-LiveFormat)
- [class LiveProtocol()](#class-LiveProtocol)
- [class LiveRoom()](#class-LiveRoom)
  - [def \_\_init\_\_()](#def-\_\_init\_\_)
  - [async def ban\_user()](#async-def-ban\_user)
  - [async def get\_black\_list()](#async-def-get\_black\_list)
  - [async def get\_dahanghai()](#async-def-get\_dahanghai)
  - [async def get\_danmu\_info()](#async-def-get\_danmu\_info)
  - [async def get\_emoticons()](#async-def-get\_emoticons)
  - [async def get\_fan\_model()](#async-def-get\_fan\_model)
  - [async def get\_fans\_medal\_rank()](#async-def-get\_fans\_medal\_rank)
  - [async def get\_gaonengbang()](#async-def-get\_gaonengbang)
  - [async def get\_general\_info()](#async-def-get\_general\_info)
  - [async def get\_gift\_common()](#async-def-get\_gift\_common)
  - [async def get\_gift\_special()](#async-def-get\_gift\_special)
  - [async def get\_popular\_ticket\_num()](#async-def-get\_popular\_ticket\_num)
  - [async def get\_room\_id()](#async-def-get\_room\_id)
  - [async def get\_room\_info()](#async-def-get\_room\_info)
  - [async def get\_room\_play\_info()](#async-def-get\_room\_play\_info)
  - [async def get\_room\_play\_info\_v2()](#async-def-get\_room\_play\_info\_v2)
  - [async def get\_room\_play\_url()](#async-def-get\_room\_play\_url)
  - [async def get\_ruid()](#async-def-get\_ruid)
  - [async def get\_seven\_rank()](#async-def-get\_seven\_rank)
  - [async def get\_user\_info\_in\_room()](#async-def-get\_user\_info\_in\_room)
  - [async def receive\_reward()](#async-def-receive\_reward)
  - [async def send\_danmaku()](#async-def-send\_danmaku)
  - [async def send\_emoticon()](#async-def-send\_emoticon)
  - [async def send\_gift\_from\_bag()](#async-def-send\_gift\_from\_bag)
  - [async def send\_gift\_gold()](#async-def-send\_gift\_gold)
  - [async def send\_gift\_silver()](#async-def-send\_gift\_silver)
  - [async def send\_popular\_ticket()](#async-def-send\_popular\_ticket)
  - [async def sign\_up\_dahanghai()](#async-def-sign\_up\_dahanghai)
  - [async def start()](#async-def-start)
  - [async def stop()](#async-def-stop)
  - [async def unban\_user()](#async-def-unban\_user)
  - [async def update\_news()](#async-def-update\_news)
- [class ScreenResolution()](#class-ScreenResolution)
- [async def create\_live\_reserve()](#async-def-create\_live\_reserve)
- [async def get\_area\_info()](#async-def-get\_area\_info)
- [async def get\_gift\_config()](#async-def-get\_gift\_config)
- [async def get\_live\_followers\_info()](#async-def-get\_live\_followers\_info)
- [async def get\_self\_bag()](#async-def-get\_self\_bag)
- [async def get\_self\_dahanghai\_info()](#async-def-get\_self\_dahanghai\_info)
- [async def get\_self\_info()](#async-def-get\_self\_info)
- [async def get\_self\_live\_info()](#async-def-get\_self\_live\_info)
- [async def get\_self\_live\_watching\_history()](#async-def-get\_self\_live\_watching\_history)
- [async def get\_unlive\_followers\_info()](#async-def-get\_unlive\_followers\_info)

---

## class LiveCodec()

**Extend: enum.Enum**

直播源视频编码

视频编码,0 为 avc 编码,1 为 hevc 编码。默认:0,1
+ AVC   : 0。
+ HEVC  : 1。
+ DEFAULT   : 0,1。




---

## class LiveDanmaku()

**Extend: bilibili_api.utils.AsyncEvent.AsyncEvent**

Websocket 实时获取直播弹幕

Extends: AsyncEvent

Logger: LiveDanmaku().logger

Events:
+ DANMU_MSG: 用户发送弹幕
+ SEND_GIFT: 礼物
+ COMBO_SEND: 礼物连击
+ GUARD_BUY: 续费大航海
+ SUPER_CHAT_MESSAGE: 醒目留言(SC)
+ SUPER_CHAT_MESSAGE_JPN: 醒目留言(带日语翻译?)
+ SUPER_CHAT_MESSAGE_DELETE: 醒目留言删除
+ WELCOME: 老爷进入房间
+ WELCOME_GUARD: 房管进入房间
+ NOTICE_MSG: 系统通知(全频道广播之类的)
+ PREPARING: 直播准备中
+ LIVE: 直播开始
+ ROOM_REAL_TIME_MESSAGE_UPDATE: 粉丝数等更新
+ ENTRY_EFFECT: 进场特效
+ ROOM_RANK: 房间排名更新
+ INTERACT_WORD_V2: 用户进入直播间 (*)
+ ACTIVITY_BANNER_UPDATE_V2: 好像是房间名旁边那个 xx 小时榜
+ DM_INTERACTION: 交互信息合并
+ USER_TOAST_MSG: 用户庆祝消息
+ GIFT_STAR_PROCESS: 礼物星球点亮
+ SPECIAL_GIFT: 特殊礼物
+ ONLINE_RANK_V3: 直播间高能榜 (*)
+ LOG_IN_NOTICE: 未登录通知
+ ONLINE_RANK_TOP3: 用户到达直播间高能榜前三名的消息
+ POPULAR_RANK_CHANGED: 直播间在人气榜的排名改变
+ HOT_RANK_CHANGED / HOT_RANK_CHANGED_V2: 直播间限时热门榜排名改变
+ HOT_RANK_SETTLEMENT / HOT_RANK_SETTLEMENT_V2: 限时热门榜上榜信息
+ LIKE_INFO_V3_CLICK: 直播间用户点赞
+ LIKE_INFO_V3_UPDATE: 直播间点赞数更新
+ POPULARITY_RED_POCKET_START: 直播间发红包弹幕
+ POPULARITY_RED_POCKET_NEW: 直播间红包
+ POPULARITY_RED_POCKET_WINNER_LIST: 直播间抢到红包的用户
+ WATCHED_CHANGE: 直播间看过人数
+ ENTRY_EFFECT_MUST_RECEIVE: 必须接受的用户进场特效
+ FULL_SCREEN_SPECIAL_EFFECT: 全屏特效
+ AREA_RANK_CHANGED: 直播间在所属分区的排名改变
+ COMMON_NOTICE_DANMAKU: 广播通知弹幕信息
+ ROOM_CHANGE: 直播间信息更改
+ ROOM_CONTENT_AUDIT_REPORT: 直播间内容审核报告
+ SUPER_CHAT_ENTRANCE: 醒目留言按钮
+ WIDGET_BANNER: 顶部横幅
+ WIDGET_WISH_LIST: 礼物心愿单进度
+ WIDGET_WISH_INFO: 礼物星球信息
+ STOP_LIVE_ROOM_LIST: 下播的直播间
+ SYS_MSG: 系统信息
+ WARNING: 警告
+ CUT_OFF: 切断
+ CUT_OFF_V2: 切断V2
+ ANCHOR_ECOLOGY_LIVING_DIALOG: 直播对话框
+ CHANGE_ROOM_INFO: 直播间背景图片修改
+ ROOM_SKIN_MSG: 直播间皮肤变更
+ ROOM_SILENT_ON: 开启等级禁言
+ ROOM_SILENT_OFF: 关闭等级禁言
+ ROOM_BLOCK_MSG: 指定观众禁言
+ ROOM_ADMINS: 房管列表
+ room_admin_entrance: 设立房管
+ ROOM_ADMIN_REVOKE: 撤销房管
+ ANCHOR_LOT_CHECKSTATUS: 天选时刻合法检查
+ ANCHOR_LOT_START: 天选时刻开始
+ ANCHOR_LOT_END: 天选时刻结束
+ ANCHOR_LOT_AWARD: 天选时刻中奖者
+ ANCHOR_LOT_NOTICE: 天选时刻通知
+ VOICE_JOIN_SWITCH: 语音连麦开关
+ VIDEO_CONNECTION_JOIN_START: 邀请视频连线
+ VIDEO_CONNECTION_MSG: 视频连线信息
+ VIDEO_CONNECTION_JOIN_END: 结束视频连线
+ PLAY_TAG: 直播进度条节点标签
+ OTHER_SLICE_LOADING_RESULT: 直播剪辑
+ GOTO_BUY_FLOW: 有人购买主播推荐商品
+ HOT_BUY_NUM: 热抢提示
+ WEALTH_NOTIFY: 荣耀等级通知
+ MESSAGEBOX_USER_MEDAL_CHANGE: 粉丝勋章更新
+ MESSAGEBOX_USER_GAIN_MEDAL: 获得粉丝勋章
+ FANS_CLUB_POKE_GIFT_NOTICE: 粉丝团戳一戳礼物通知
+ ===========================
+ 本模块自定义事件:
+ ==========================
+ VIEW: 直播间人气更新
+ ALL: 所有事件
+ DISCONNECT: 断开连接(传入连接状态码参数)
+ TIMEOUT: 心跳响应超时
+ VERIFICATION_SUCCESSFUL: 认证成功

(*: 包含 protobuf 格式数据的事件,模块将自动解析 protobuf 数据格式并连同原数据一同返回)




### def \_\_init\_\_()


| name | type | description |
| - | - | - |
| `room_display_id` | `int` | 房间展示 ID |
| `debug` | `bool, optional` | 调试模式,将输出更多信息。. Defaults to False. |
| `credential` | `Credential \| None, optional` | 凭据. Defaults to None. |
| `max_retry` | `int, optional` | 连接出错后最大重试次数. Defaults to 5 |
| `retry_after` | `int, optional` | 连接出错后重试间隔时间(秒). Defaults to 1 |
| `max_retry_for_credential` | `int, optional` | 获取用户信息最大重试次数. Defaults to 5 |


### async def connect()

连接直播间






### async def disconnect()

断开连接






### def get_live_room()

获取对应直播间对象



**Returns:** `LiveRoom`:  直播间对象




### def get_status()

获取连接状态



**Returns:** `int`:  0 初始化,1 连接建立中,2 已连接,3 断开连接中,4 已断开,5 错误




---

## class LiveFormat()

**Extend: enum.Enum**

直播源容器格式

容器格式,0 为 flv 格式;1 为 ts 格式(仅限 hls 流);2 为 fmp4 格式(仅限 hls 流)。默认:0,2
+ FLV   : 0。
+ TS: 1。
+ FMP4  : 2。
+ DEFAULT   : 2。




---

## class LiveProtocol()

**Extend: enum.Enum**

直播源流协议。

流协议,0 为 FLV 流,1 为 HLS 流。默认:0,1
+ FLV : 0。
+ HLS : 1。
+ DEFAULT : 0,1




---

## class LiveRoom()

直播类,获取各种直播间的操作均在里边。


| name | type | description |
| - | - | - |
| `credential` | `Credential` | 凭据类 |
| `room_display_id` | `int` | 房间展示 id |


### def \_\_init\_\_()


| name | type | description |
| - | - | - |
| `room_display_id` | `int` | 房间展示 ID(即 URL 中的 ID) |
| `credential` | `Credential, optional` | 凭据. Defaults to None. |


### async def ban_user()

封禁用户


| name | type | description |
| - | - | - |
| `uid` | `int` | 用户 UID |
| `hour` | `int` | 禁言时长,-1为永久,0为直到本场结束 |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_black_list()

获取黑名单列表



**Returns:** `dict`:  调用 API 返回的结果




### async def get_dahanghai()

获取大航海列表


| name | type | description |
| - | - | - |
| `page` | `int, optional` | 页码. Defaults to 1. |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_danmu_info()

获取聊天弹幕服务器配置信息(websocket)



**Returns:** `dict`:  调用 API 返回的结果




### async def get_emoticons()

获取本房间可用表情包



**Returns:** `dict`:  调用 API 返回的结果




### async def get_fan_model()

获取自己的粉丝勋章信息

如果带有房间号就返回是否具有的判断 has_medal

如果带有主播 id ,就返回主播的粉丝牌,没有就返回 null


| name | type | description |
| - | - | - |
| `roomId` | `int, optional` | 指定房间,查询是否拥有此房间的粉丝牌 |
| `target_id` | `int \| None, optional` | 指定返回一个主播的粉丝牌,留空就不返回 |
| `page_num` | `int \| None, optional` | 粉丝牌列表,默认 1 |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_fans_medal_rank()

获取粉丝勋章排行



**Returns:** `dict`:  调用 API 返回的结果




### async def get_gaonengbang()

获取高能榜列表


| name | type | description |
| - | - | - |
| `page` | `int, optional` | 页码. Defaults to 1 |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_general_info()

获取自己在该房间的大航海信息, 比如是否开通, 等级等


| name | type | description |
| - | - | - |
| `act_id` | `int, optional` | 未知,Defaults to 100061 |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_gift_common()

获取当前直播间内的普通礼物列表



**Returns:** `dict`:  调用 API 返回的结果




### async def get_gift_special()

注:此 API 已失效,请使用 live.get_gift_config

获取当前直播间内的特殊礼物列表


| name | type | description |
| - | - | - |
| `tab_id` | `int` | 2:特权礼物,3:定制礼物 |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_popular_ticket_num()

获取自己在直播间的人气票数量(付费人气票已赠送的量,免费人气票的持有量)



**Returns:** `dict`:  调用 API 返回的结果




### async def get_room_id()

获取直播间真实 id



**Returns:** `int`:  直播间 id




### async def get_room_info()

获取直播间信息(标题,简介等)



**Returns:** `dict`:  调用 API 返回的结果




### async def get_room_play_info()

获取房间信息(真实房间号,封禁情况等)



**Returns:** `dict`:  调用 API 返回的结果




### async def get_room_play_info_v2()

获取房间信息及可用清晰度列表


| name | type | description |
| - | - | - |
| `live_protocol` | `LiveProtocol, optional` | 直播源流协议. Defaults to LiveProtocol.DEFAULT. |
| `live_format` | `LiveFormat, optional` | 直播源容器格式. Defaults to LiveFormat.DEFAULT. |
| `live_codec` | `LiveCodec, optional` | 直播源视频编码. Defaults to LiveCodec.DEFAULT. |
| `live_qn` | `ScreenResolution, optional` | 直播源清晰度. Defaults to ScreenResolution.ORIGINAL. |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_room_play_url()

获取房间直播流列表


| name | type | description |
| - | - | - |
| `screen_resolution` | `ScreenResolution, optional` | 清晰度. Defaults to ScreenResolution.ORIGINAL |

**Returns:** `dict`:  调用 API 返回的结果




### async def get_ruid()

获取直播的 up 的 uid (ruid)



**Returns:** `int`:  ruid




### async def get_seven_rank()

获取七日榜



**Returns:** `dict`:  调用 API 返回的结果




### async def get_user_info_in_room()

获取自己在直播间的信息(粉丝勋章等级,直播用户等级等)



**Returns:** `dict`:  调用 API 返回的结果




### async def receive_reward()

领取自己在某个直播间的航海日志奖励


| name | type | description |
| - | - | - |
| `receive_type` | `int` | 领取类型,Defaults to 2. |

**Returns:** `dict`:  调用 API 返回的结果




### async def send_danmaku()

直播间发送弹幕


| name | type | description |
| - | - | - |
| `danmaku` | `Danmaku` | 弹幕类 |
| `reply_mid` | `int, optional` | @的 UID. Defaults to None. |

**Returns:** `dict`:  调用 API 返回的结果




### async def send_emoticon()

直播间发送表情包


| name | type | description |
| - | - | - |
| `emoticon` | `Danmaku` | text为表情包代号 |

**Returns:** `dict`:  调用 API 返回的结果




### async def send_gift_from_bag()

赠送包裹中的礼物,获取包裹信息可以使用 get_self_bag 方法


| name | type | description |
| - | - | - |
| `uid` | `int` | 赠送用户的 UID |
| `bag_id` | `int` | 礼物背包 ID |
| `gift_id` | `int` | 礼物 ID |
| `gift_num` | `int` | 礼物数量 |
| `storm_beat_id` | `int, optional` | 未知, Defaults to 0 |
| `price` | `int, optional` | 礼物单价,Defaults to 0 |

**Returns:** `dict`:  调用 API 返回的结果




### async def send_gift_gold()

赠送金瓜子礼物


| name | type | description |
| - | - | - |
| `uid` | `int` | 赠送用户的 UID |
| `gift_id` | `int` | 礼物 ID (可以通过 get_gift_common 或 get_gift_special 或 get_gift_config 获取) |
| `gift_num` | `int` | 赠送礼物数量 |
| `price` | `int` | 礼物单价 |
| `storm_beat_id` | `int, Optional` | 未知,Defaults to 0 |

**Returns:** `dict`:  调用 API 返回的结果




### async def send_gift_silver()

赠送银瓜子礼物


| name | type | description |
| - | - | - |
| `uid` | `int` | 赠送用户的 UID |
| `gift_id` | `int` | 礼物 ID (可以通过 get_gift_common 或 get_gift_special 或 get_gift_config 获取) |
| `gift_num` | `int` | 赠送礼物数量 |
| `price` | `int` | 礼物单价 |
| `storm_beat_id` | `int, Optional` | 未知, Defaults to 0 |

**Returns:** `dict`:  调用 API 返回的结果




### async def send_popular_ticket()

赠送自己在直播间的所有免费人气票



**Returns:** `dict`:  调用 API 返回的结果




### async def sign_up_dahanghai()

大航海签到


| name | type | description |
| - | - | - |
| `task_id` | `int, optional` | 签到任务 ID. Defaults to 1447 |

**Returns:** `dict`:  调用 API 返回的结果




### async def start()

开始直播


| name | type | description |
| - | - | - |
| `area_id` | `int` | 直播分区id(子分区id)。可使用 live_area 模块查询。 |

**Returns:** `dict`:  调用 API 返回的结果




### async def stop()

关闭直播



**Returns:** `dict`:  调用 API 返回的结果




### async def unban_user()

解封用户


| name | type | description |
| - | - | - |
| `uid` | `int` | 用户 UID |

**Returns:** `dict`:  调用 API 返回的结果




### async def update_news()

更新公告


| name | type | description |
| - | - | - |
| `content` | `str` | 最多 60 字符 |

**Returns:** `dict`:  调用 API 返回的结果




---

## class ScreenResolution()

**Extend: enum.Enum**

直播源清晰度。

清晰度编号,4K 20000,原画 10000,蓝光(杜比)401,蓝光 400,超清 250,高清 150,流畅 80
+ FOUR_K: 4K。
+ ORIGINAL  : 原画。
+ BLU_RAY_DOLBY : 蓝光(杜比)。
+ BLU_RAY   : 蓝光。
+ ULTRA_HD  : 超清。
+ HD: 高清。
+ FLUENCY   : 流畅。




---

## async def create_live_reserve()

创建直播预约


| name | type | description |
| - | - | - |
| `title` | `str` | 直播间标题 |
| `start_time` | `int` | 开播时间戳 |

**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_area_info()

获取所有分区信息



**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_gift_config()

获取所有礼物的信息,包括礼物 id、名称、价格、等级等。

同时填了 room_id、area_id、area_parent_id,则返回一个较小的 json,只包含该房间、该子区域、父区域的礼物。

但即使限定了三个条件,仍然会返回约 1.5w 行的 json。不加限定则是 2.8w 行。


| name | type | description |
| - | - | - |
| `room_id` | `int, optional` | 房间显示 ID. Defaults to None. |
| `area_id` | `int, optional` | 子分区 ID. Defaults to None. |
| `area_parent_id` | `int, optional` | 父分区 ID. Defaults to None. |

**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_live_followers_info()

获取关注列表中正在直播的直播间信息,包括房间直播热度,房间名称及标题,清晰度,是否官方认证等信息。


| name | type | description |
| - | - | - |
| `need_recommend` | `bool, optional` | 是否接受推荐直播间,Defaults to True |

**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_self_bag()

获取自己的直播礼物包裹信息



**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_self_dahanghai_info()

获取自己开通的大航海信息


| name | type | description |
| - | - | - |
| `page` | `int, optional` | 页数. Defaults to 1. |
| `page_size` | `int, optional` | 每页数量. Defaults to 10. |

**Returns:** `dict`:  调用 API 返回的结果


总页数取得方法:

```python
import math

info = live.get_self_live_info(credential)
pages = math.ceil(info['data']['guards'] / 10)
```



---

## async def get_self_info()

获取自己直播等级、排行等信息



**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_self_live_info()

获取自己的粉丝牌、大航海等信息



**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_self_live_watching_history()

获取用户直播观看记录


| name | type | description |
| - | - | - |
| `credential` | `Credential` | 凭据类 |

**Returns:** `dict`:  调用 API 返回的结果




---

## async def get_unlive_followers_info()

获取关注列表中未在直播的直播间信息,包括上次开播时间,上次开播的类别,直播间公告,是否有录播等。


| name | type | description |
| - | - | - |
| `page` | `int, optional` | 页码, Defaults to 1. |
| `page_size` | `int, optional` | 每页数量 Defaults to 30. |

**Returns:** `dict`:  调用 API 返回的结果




reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 319kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 319kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 319kUpdated Claude CodeCodexVerifiedInstall