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/ass.md

View on GitHub
# Module ass.py


bilibili_api.ass

有关 ASS 文件的操作


``` python
from bilibili_api import ass
```

- [class AssSubtitleObject()](#class-AssSubtitleObject)
  - [def \_\_init\_\_()](#def-\_\_init\_\_)
  - [def get\_lan\_list()](#def-get\_lan\_list)
  - [async def request\_ass\_data\_json()](#async-def-request\_ass\_data\_json)
  - [def to\_ass()](#def-to\_ass)
  - [def to\_lrc()](#def-to\_lrc)
  - [def to\_simple\_json()](#def-to\_simple\_json)
  - [def to\_simple\_json\_str()](#def-to\_simple\_json\_str)
  - [def to\_srt()](#def-to\_srt)
- [async def make\_ass\_file\_danmakus\_protobuf()](#async-def-make\_ass\_file\_danmakus\_protobuf)
- [async def make\_ass\_file\_danmakus\_xml()](#async-def-make\_ass\_file\_danmakus\_xml)
- [async def make\_ass\_file\_subtitle()](#async-def-make\_ass\_file\_subtitle)
- [async def make\_lrc\_file\_subtitle()](#async-def-make\_lrc\_file\_subtitle)
- [async def make\_simple\_json\_file\_subtitle()](#async-def-make\_simple\_json\_file\_subtitle)
- [async def make\_srt\_file\_subtitle()](#async-def-make\_srt\_file\_subtitle)
- [async def request\_subtitle()](#async-def-request\_subtitle)

---

## class AssSubtitleObject()





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

获取远程字幕


| name | type | description |
| - | - | - |
| `json_lan_list` | `json` | 字幕可选语言 |
| `obj` | `Union[Video,Episode]` | 对象 |
| `lan_set` | `str` | 设置默认字幕语言,如果为None,则自动获取可获取语言 |


### def get_lan_list()

获取字幕语言列表



**Returns:** `Tuple[List[str], List[Optional[str]]]`:  字幕名,字幕语言代码




### async def request_ass_data_json()

获取对应语言的字幕


| name | type | description |
| - | - | - |
| `lan_set` | `str` | 如果为None,则获取默认字幕语言 |

**Returns:** `json`:  字幕数据




### def to_ass()

获取ass格式的字幕



**Returns:** `str`:  ass字幕




### def to_lrc()

获取lrc格式的字幕



**Returns:** `str`:  lrc字幕




### def to_simple_json()

获取简化后的JSON数据



**Returns:** `json`:  字幕数据




### def to_simple_json_str()

获取简化后的JSON字符串



**Returns:** `str`:  获取简化后的JSON字符串




### def to_srt()

获取srt格式的字幕



**Returns:** `str`:  srt字幕




---

## async def make_ass_file_danmakus_protobuf()

生成视频弹幕文件

弹幕数据来源于 protobuf 接口

编码默认采用 utf-8


| name | type | description |
| - | - | - |
| `obj` | `Union[Video,Episode,CheeseVideo]` | 对象 |
| `page` | `int, optional` | 分 P 号. Defaults to 0. |
| `out` | `str, optional` | 输出文件. Defaults to "test.ass" |
| `cid` | `int \| None, optional` | cid. Defaults to None. |
| `date` | `datetime.date, optional` | 获取时间. Defaults to None. |
| `font_name` | `str, optional` | 字体. Defaults to "Simsun". |
| `font_size` | `float, optional` | 字体大小. Defaults to 25.0. |
| `alpha` | `float, optional` | 透明度(0-1). Defaults to 1. |
| `fly_time` | `float, optional` | 滚动弹幕持续时间. Defaults to 7. |
| `static_time` | `float, optional` | 静态弹幕持续时间. Defaults to 5. |




---

## async def make_ass_file_danmakus_xml()

生成视频弹幕文件

弹幕数据来源于 xml 接口

编码默认采用 utf-8


| name | type | description |
| - | - | - |
| `obj` | `Union[Video,Episode,Cheese]` | 对象 |
| `page` | `int, optional` | 分 P 号. Defaults to 0. |
| `out` | `str, optional` | 输出文件. Defaults to "test.ass". |
| `cid` | `int \| None, optional` | cid. Defaults to None. |
| `font_name` | `str, optional` | 字体. Defaults to "Simsun". |
| `font_size` | `float, optional` | 字体大小. Defaults to 25.0. |
| `alpha` | `float, optional` | 透明度(0-1). Defaults to 1. |
| `fly_time` | `float, optional` | 滚动弹幕持续时间. Defaults to 7. |
| `static_time` | `float, optional` | 静态弹幕持续时间. Defaults to 5. |




---

## async def make_ass_file_subtitle()

生成ass格式视频字幕文件

编码默认采用 utf-8


| name | type | description |
| - | - | - |
| `obj` | `Union[Video,Episode]` | 对象 |
| `page_index` | `int, optional` | 分 P 索引 |
| `cid` | `int, optional` | cid |
| `out` | `str, optional` | 输出位置. Defaults to "test.ass". |
| `lan_name` | `str, optional` | 字幕名,如”中文(自动生成)“,是简介的 subtitle 项的'list'项中的弹幕的'lan_doc'属性。Defaults to "中文(自动生成)". |
| `lan_code` | `str, optional` | 字幕语言代码,如 ”中文(自动翻译)” 和 ”中文(自动生成)“ 为 "ai-zh" |
| `credential` | `Credential, optional` | Credential 类. 必须在此处或传入的视频 obj 中传入凭据,两者均存在则优先此处 |




---

## async def make_lrc_file_subtitle()

生成lrc格式视频字幕文件

编码默认采用 utf-8


| name | type | description |
| - | - | - |
| `obj` | `Union[Video,Episode]` | 对象 |
| `page_index` | `int, optional` | 分 P 索引 |
| `cid` | `int, optional` | cid |
| `out` | `str, optional` | 输出位置. Defaults to "test.lrc". |
| `lan_name` | `str, optional` | 字幕名,如”中文(自动生成)“,是简介的 subtitle 项的'list'项中的弹幕的'lan_doc'属性。Defaults to "中文(自动生成)". |
| `lan_code` | `str, optional` | 字幕语言代码,如 ”中文(自动翻译)” 和 ”中文(自动生成)“ 为 "ai-zh" |
| `credential` | `Credential, optional` | Credential 类. 必须在此处或传入的视频 obj 中传入凭据,两者均存在则优先此处 |




---

## async def make_simple_json_file_subtitle()

生成简化后的json格式视频字幕文件

编码默认采用 utf-8


| name | type | description |
| - | - | - |
| `obj` | `Union[Video,Episode]` | 对象 |
| `page_index` | `int, optional` | 分 P 索引 |
| `cid` | `int, optional` | cid |
| `out` | `str, optional` | 输出位置. Defaults to "test.json". |
| `lan_name` | `str, optional` | 字幕名,如”中文(自动生成)“,是简介的 subtitle 项的'list'项中的弹幕的'lan_doc'属性。Defaults to "中文(自动生成)". |
| `lan_code` | `str, optional` | 字幕语言代码,如 ”中文(自动翻译)” 和 ”中文(自动生成)“ 为 "ai-zh" |
| `credential` | `Credential, optional` | Credential 类. 必须在此处或传入的视频 obj 中传入凭据,两者均存在则优先此处 |




---

## async def make_srt_file_subtitle()

生成srt格式视频字幕文件

编码默认采用 utf-8


| name | type | description |
| - | - | - |
| `obj` | `Union[Video,Episode]` | 对象 |
| `page_index` | `int, optional` | 分 P 索引 |
| `cid` | `int, optional` | cid |
| `out` | `str, optional` | 输出位置. Defaults to "test.srt". |
| `lan_name` | `str, optional` | 字幕名,如”中文(自动生成)“,是简介的 subtitle 项的'list'项中的弹幕的'lan_doc'属性。Defaults to "中文(自动生成)". |
| `lan_code` | `str, optional` | 字幕语言代码,如 ”中文(自动翻译)” 和 ”中文(自动生成)“ 为 "ai-zh" |
| `credential` | `Credential, optional` | Credential 类. 必须在此处或传入的视频 obj 中传入凭据,两者均存在则优先此处 |




---

## async def request_subtitle()

获取远程字幕


| name | type | description |
| - | - | - |
| `obj` | `Union[Video,Episode]` | 对象 |
| `page_index` | `int, optional` | 分 P 索引 |
| `cid` | `int, optional` | cid |
| `lan_name` | `str, optional` | 字幕名,如”中文(自动生成)“,是简介的 subtitle 项的'list'项中的弹幕的'lan_doc'属性。Defaults to "中文(自动生成)" 默认None 则自动获取可用歌词. |
| `lan_code` | `str, optional` | 字幕语言代码,如 ”中文(自动翻译)” 和 ”中文(自动生成)“ 为 "ai-zh" 默认None 则自动获取可用歌词 |
| `credential` | `Credential, optional` | Credential 类. 必须在此处或传入的视频 obj 中传入凭据,两者均存在则优先此处 |

**Returns:** `AssSubtitleObject`:  字幕对象




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