Releases: Nemo2011/bilibili-api
v17.2.1
v17.2.0
-
chore(deps): pycryptodomex from ~=3.21.0 to ~=3.23.0
-
chore(deps): qrcode from ~=8.0 to ~=8.2
-
chore(deps): lxml from ~=5.3.1 to ~=5.4.0
-
chore(deps): pillow from ~= 11.1.0 to ~=11.2.1
-
chore(deps): beautifulsoup4 from ~=4.13.3 to ~=4.13.4
-
chore(deps): yarl from ~=1.18.3 to ~=1.20.0
-
fix: live_area.get_list_by_area credential & wbi in #901 #907
-
fix: Credential.from_cookies in #906
-
fix: live.LiveDanmaku ws_close KeyError in #908
-
fix: homepage.get_videos 新接口 in #904
-
fix: PEP 621 影响 uv add 安裝软件包 in #919 #920 by @JaydenChao101
-
fix: live.LiveDanmaku 不明确的信息 in #913 following #913 (comment) by @rebasecontinue
-
fix: NetworkException 消失 in #929
-
fix: RankType 参数 in #928
-
fix: json 中的 http 链接 & allow_redirects 默认为 False in #932
-
fix(CurlCFFIClient): return BiliWsMsgType.CLOSED when CURLE_GOT_NOTHING
-
fix: ass 于 windows 上触发 gbk in #916
-
fix: 直播相关问题 #934
-
feat: Article.get_detail
-
feat: video.VideoQuality.AI_REPAIR
New Contributors
- @JaydenChao101 made their first contribution in #920
- @Alkaid-C made their first contribution in #930
Full Changelog: 17.1.4...17.2.0
v17.1.4
v17.1.3
- [BREAKING CHANGE]: curl_cffi 不再默认模仿
chrome131
,如需模仿浏览器需要手动设置(request_settings.set("impersonate", "xxx")
- fix: 代码弹幕 mode8 in DmMode
- feat: Credential 支持 buvid4
- fix: w_webid related in #892
- feat: bili_simple_download
- feat: recalculate_wbi, refresh_bili_ticket, refresh_buvid
- fix: session.send_msg (originally posted in #828)
v17.1.2
- fix: pyinstaller hooks
- fix: 移除 interactive_video 中对私有变量的使用
- fix: user.User.get_dynamics_new 出现 wbi #890
- feat: 新增 blackroom.get_jury_case_raw (
-> dict
), dynamic.get_dynamic_page_info (-> dict
) - [BREAKING CHANGE] chore: 原 dynamic.get_dynamic_page_info (
-> List[Dynamic]
) 移至 dynamic.get_dynamic_page_list
17.1.1
What's Changed
- fix: app.get_loading_images_special
- fix: audio_uploader.upload_cover
- fix: login_v2.LoginCheck 特殊情况
- chore: update VideoAppealReasonType
- [BREAKING CHANGE] fix: ass.make_ass_file_danmakus_protobuf 移除 credential 参数
- [BREAKING CHANGE] refactor: remove class EpisodeTryMP4DownloadURL, HTML5MP4DownloadURL, add class MP4StreamDownloadURL 与相关返回值变动
- [BREAKING CHANGE] refactor: remove video.VideoDownloadURLDataDetecter.check_flv_stream, video.VideoDownloadURLDataDetecter.check_html5_mp4_stream, video.VideoDownloadURLDataDetecter.check_episode_try_mp4_stream, add check_flv_mp4_stream
- feat: user.User.get_opus
- feat: parse_link 支持 opus
- feat: 支持配置第三方请求库使用 HTTP2,支持设置 curl_cffi 伪装的目标浏览器。设置方法见相关文档。
- chore(deps): update beautifulsoup4 requirement from ~=4.12.3 to ~=4.13.0 by @dependabot in #885
- chore(deps): update beautifulsoup4 requirement from ~=4.13.0 to ~=4.13.3 by @dependabot in #888
- chore(deps): update lxml requirement from ~=5.3.0 to ~=5.3.1 by @dependabot in #889
Full Changelog: 17.1.0...17.1.1
v17.1.0
v17.1.0 2025/02/02
- chore(deps): 移除
curl_cffi
,安装模块时需要自行对第三方请求库进行安装。 - chore(deps): 移除
rsa
,相关代码用pycryptodomex
替代。 - chore: BiliAPIClient 抽象类新增函数
download_create
download_chunk
download_content_length
。 - feat: AsyncEvent 支持同步函数。
- feat: interactive_video.InteractiveVideoDownloader.__init__ 参数 self_download_func 再次变为非必要参数。
- fix: video.VideoDownloadURLDataDetecter 不支持修改后的 bangumi.Episode.get_download_url 返回数据。
v17.0.0 查漏补缺
- [BREAKING CHANGE] chore: 移除
settings.py
,相关功能由request_log
和request_settings
替代。
v17.0.0
v17.0.0 2025/01/28
Notice
此次更新伴随着针对底层网络请求功能的大规模重构,可以算是本次更新中最重要的一点。
现在开始,模块底层的网络请求功能全部通过用户实现的 BiliAPIClient
(一个抽象类) 具体实现,BiliAPIClient
应当以类的实例为载体对第三方请求库的会话对象进行封装,使第三方请求库可以处理模块指定传入的数据。这种模式下,用户理论上可以利用 BiliAPIClient
使模块运用上所有的第三方请求库,前提是需要自己具体实现对应的 BiliAPIClient
的实现。模块目前默认提供 curl_cffi
的 BiliAPIClient
实现,将 curl_cffi
作为第三方请求库,同时支持切换为 aiohttp
和 httpx
。
select_client("aiohttp") # 切换为 aiohttp
select_client("httpx") # 切换为 httpx
更多信息见 自定义请求库。
下文为本次更新其他更新内容,存在部分破坏修改。最后是所有在 16.3.0 -> 17.0.0
中修改的 API 的列表。
What's Other Changed
-
chore(deps): remove
httpx
-
chore(deps): update
aiohttp ~= 3.10.5 -> ~= 3.11.11
-
chore(deps): update
pycryptodomex ~= 3.20.0 -> ~= 3.21.0
-
chore(deps): update
yarl ~= 1.11.1 -> ~= 1.17.2
-
chore(deps): update
qrcode ~= 7.4.2 -> ~= 8.0
-
chore(deps): update
pyjwt ~= 2.9.0 -> ~= 2.10.0
-
chore(deps): update
pillow ~= 10.4.0 -> ~= 11.0.0
-
chore(deps): update
apscheduler ~= 3.10.4 -> ~= 3.11.0
-
feat:
login_v2
module. 使用样例见 自定义请求库。 -
feat:
search.search_by_type
增加功能:可以按照时间段查询 & 新增to_timestamps
函数 by @xianrenzhou in #866 -
feat:
Dynamic.set_favorite
-
feat:
emoji.get_emoji_detail
&emoji.get_all_emoji
-
[BREAKING CHANGE] feat:
live_area.fetch_live_area_data
之后调用live_area
查询分区函数必须先调用此方法 -
feat:
dynamic.get_lottery_info
-
feat: 支持在事件循环已经运行时同步执行异步代码 by @LondonClass in #743
-
feat:
dynamic.Dynamic.markdown
-
feat:
manga.get_followed_manga
-
fix:
VideoDownloadURLDataDetecter
-
[BREAKING CHANGE] fix: remove argument
uid
forUser.get_relation
之后调用get_relation
默认判断User.get_uid()
与自己的信息而不是传入函数的参数 -
fix: 字母接口风控 #841 & 游客下无法访问用户视频投稿
-
[BREAKING CHANGE] fix:
user.name2uid
此方法目前必须携带凭据类 经过测试,更改后的 api 只能登录后访问。若要不登录访问一定程度上可以使用搜索功能替代 -
fix:
comment.get_comments_lazy
传参问题 #871 -
fix:
manga.get_info
-
fix: 当
buvid3
已有时仍尝试获取buvid3
-
fix:
Video.get_danmaku_view
-
[BREAKING CHANGE] fix: 因为
video.get_cid_info
(属于 biliplus https://hd.biliplus.com 的 api)部分新视频数据没有记录,暂时缺少方法处理笔记正文内容视频卡片的cid
数据,所以目前note.Note.fetch_content
不再支持解析视频卡片。 -
[BREAKING CHANGE] fix: 考虑到多方面因素,
interactive_video.InteractiveVideoDownloader
参数self_download_func
不再默认提供。 -
fix: 查看用户合集中的视频(新版)API变更 by @TangMisaka23001 in #880
-
fix:
opus.get_info
-
[BREAKING CHANGE] fix: 因更新频率过高且不易维护,
emote.json
被移除。dynamic.BuildDynamic.add_emoji
被修改。 -
[BREAKING CHANGE] refactor: 重构
bangumi
/cheese
/channel_series
/video_tag
等,移除所有同步代码,**部分原同步函数改为异步函数。**大多此类函数原来是同步的获取属性的函数,例如get_meta
get_season_id
,这些数据原为__init__
中通过同步请求获取。 -
[BREAKING CHANGE] refactor: 重写大量
opus
dynamic
article
note
间互相转换/关联的代码。 -
refactor:
dynamic.BuildDynamic
内部移除同步请求模式,相关完善正文内容请求将移至dynamic.send_dynamic
进行,即dynamic.send_dynamic
请求数可能会增多,但dynamic.BuildDynamic
不会再有请求。 -
[BREAKING CHANGE] chore: remove support for Python 3.8.
-
chore: 更新
data/**.json
-
[BREAKING CHANGE] chore: **
Manga
类大多函数 和manga.manga_image_url_turn_to_Picture
manga.get_raw_manga_index
manga.get_manga_index
无限期被移除。所有函数目前均已失效。**这是源于 bilibili 漫画接口在 2024 年末、2025 年初这段时间的变动,出现了新字段,接口返回数据也出现了加密。相关讨论:#875 #bac1168 #bac1130 -
[BREAKING CHANGE] chore: 移除
login
login_func
模块。
查漏补缺
- [BREAKING CHANGE] chore: 移除
settings.py
,相关功能由request_log
和request_settings
替代。
New Contributors
- @shouge made their first contribution in #837
- @xianrenzhou made their first contribution in #866
- @TangMisaka23001 made their first contribution in #880
All Changed API
__init__.py
- add
Api
- add
BiliAPIClient
- add
BiliAPIFile
- add
BiliAPIResponse
- add
BiliWsMsgType
- add
Geetest
- add
GeetestMeta
- add
GeetestServerNotFoundException
- add
GeetestUndoneException
- move async
Picture.async_load_url()
to asyncPicture.load_url()
- move async
Picture.upload_file()
to asyncPicture.upload()
- add async
Picture.upload_by_note()
- move
Picture.download_sync()
toPicture.to_file()
- remove async
Picture.download()
- add
WbiRetryTimesExceedException
- remove
get_aiohttp_session()
- remove
set_aiohttp_session()
- remove
get_httpx_sync_session()
- remove
set_httpx_sync_session()
- remove
get_buvid3()
- rewrite
get_session()
response typehttpx.AsyncClient
->object
- rewrite
set_session()
argument typehttpx.AsyncClient
->object
- add
get_client()
- add
get_selected_client()
- add
register_client()
- add
unregister_client()
- add
select_client()
- add
request_log
- add
request_settings
- add
get_registered_clients()
- add
article.py
- change
article.Article.turn_to_opus()
async - add async
article.Article.turn_to_dynamic()
- remove
article.ArticleType
- change
bangumi.py
- change
bangumi.Bangumi.get_media_id()
async - change
bangumi.Bangumi.get_raw()
async - change
bangumi.Bangumi.get_season_id()
async - change
bangumi.Bangumi.get_up_info()
async - change
bangumi.Bangumi.set_media_id()
async - change
bangumi.Bangumi.set_ssid()
async - change
bangumi.Episode.get_aid()
async - change
bangumi.Episode.get_bangumi()
async - change
bangumi.Episode.get_bvid()
async - modify
bangumi.Episode.get_cid()
addfrom_seg
to_seg
arguments
- change
black_room.py
- change async
black_room.BlackRoom.get_id()
sync - change async
black_room.BlackRoom.set_id()
sync
- change async
channel_series.py
- change
channel_series.ChannelSeries.get_meta()
async
- change
cheese.py
- change
cheese.CheeseList.get_season_id()
async - change
cheese.CheeseList.set_ep_id()
async - change
cheese.set_season_id()
async - change
cheese.Cheese.get_cheese()
async - change
cheese.Cheese.get_cid()
async - change
cheese.Cheese.get_meta()
async - change
cheese.Cheese.set_epid()
async
- change
dynamic.py
- modify
dynamic.BuildDynamic.add_at()
adduname
argument, makeuid
argumentint | user.User
->int
- modify
dynamic.BuildDynamic.add_vote()
renamevote
->vote_id
argument, makevote_id
argumentvote.Vote
->int
- change
dynamic.BuildDynamic.get_contents()
async - add async
dynamic.Dynamic.get_lottery_info()
- change
dynamic.Dynamic.is_opus()
async - add async
dynamic.Dynamic.is_article()
- add async
dynamic.Dynamic.set_favorite()
- add async
dynamic.Dynamic.turn_to_article()
- remove
dynamic.upload_image_sync()
- add async
dynamic.Dynamic.markdown()
- add async
dynamic.Dynamic.get_rid()
- modify
dynamic.BuildDynamic.add_emoji()
removeemoji_id
argument, addemoji
argument
- modify
emoji.py
- add async
emoji.get_all_emoji()
- add async
emoji.get_emoji_detail()
- modify async
emoji.get_emoji_list()
addcredential
argument
- add async
interactive_video.py
- modify
interactive_video.InteractiveVideoDownloader.__init__
removeself_download_func
argument's default value - modify
interactive_video.InteractiveVideoDownloaderEvents
remove attributesDOWNLOAD_START
DOWNLOAD_PART
DOWNLOAD_SUCCESS
- modify
live.py
- modify async
live.LiveRoom.ban_user()
add argumenthour
- add async
live.LiveRoom.get_emoticons()
- add async
live.LiveRoom.send_emoticons()
- modify async
live_area.py
- add async
live_area.fetch_live_area_data()
- add async
login.py
- remove all
login_func.py
- remove all
login_v2.py
- add
login_v2
- add
manga.py
- remove async
manga.Manga.get_images()
- remove async
manga.manga_image_url_turn_to_Picture()
- add async
manga.get_followed_manga()
- add
manga.MangaOrderType
- remove async
manga.get_manga_index()
- remove async
manga.get_raw_manga_index()
- remove async
note.py
- add async
note.upload_image()
- add async
opus.py
- change
opus.Opus.is_note()
async - change
opus.Opus.turn_to_article()
async - remove
opus.Opus.turn_to_note()
- remove
opus.Opus.is_note()
- remove
opus.Opus.get_type()
- add async
opus.Opus.is_article()
- remove
opus.OpusType
- change
opus.Opus.markdown()
async - add async
opus.Opus.set_like()
- add async
opus.Opus.set_favorite()
- add async
opus.Opus.add_coins()
- add async
opus.Opus.get_reaction()
- add async
opus.Opus.get_rid()
- change
search.py
- modify async
search.search_by_type()
addtime_start
time_end
arguments, removedebug_param_func
argument
- modify async
user.py
- add async
user.User.get_access_id()
- modify async
user.User.get_relation()
remove `u...
- add async
16.3.0
What's Changed
- build: update lxml requirement from ~=5.1.0 to ~=5.3.0
- build: update pillow requirement from ~=10.2.0 to ~=10.3.0
- build: update aiohttp requirement from ~=3.9.3 to ~=3.10.5
- build: update tqdm requirement from ~=4.66.2 to ~=4.66.5
- build: remove requests requirement
- build: update yaml requirement from ~= 1.9.4 to ~= 1.11.1
- fix: rewrite dm_img_str and dm_cover_img_str by @Nickszy in 026a8c7
- fix: 实例化 FavoriteList 对象后调用 get_content_video 时缺少 mode 参数导致的异常。 by @kawaiior in #731
- fix: add order_avoided_params by @z0z0r4 in c7491de
- fix: enable WBI sign for playurl by @mokurin000 in #754
- fix: search* apis were forced to wbi sign by @mokurin000 in #753
- fix: 获取专栏有部分专栏似乎无法正常解析图片 by @Nemo2011 in 6f8293c
- fix: VideoDownloadURLDataDetecter by @Nemo2011
- fix: buvid3 activate by @Nemo2011 in 3bcc3f4
- fix: request of get_danmaku_xml now needs user-agent header by @NaitLee in #792
- fix: 取消 buvid3 用户传入限制 by @Nemo2011 in a548b54
- fix: bangumi & dynamic init by @Nemo2011 in 8f77f05
- fix: User.get_all_followings by @Nemo2011 in 0cf6f7f
- fix: FavoriteList.get_content_video by @Nemo2011 in 31f5dcc
- fix: credential by @Nemo2011 in c1fbf4c
- fix: article / opus / note / manga by @Nemo2011
- fix: video.get_danmakus by @Nemo2011 in ca727cd
- fix: using settings.timeout for httpx client by @zuoa in #808
- fix: interactive_video 等功能 by @Nemo2011
- [BREAKING CHANGE] fix: comment.get_comments_lazy by @Nemo2011 in 638406b
- fix: Picture.upload_file by @Nemo2011 in 42e0009
- feat: 支持在事件循环已经运行时同步执行异步代码 by @LondonClass in https://github.com/Nemo2011/bilibili-api/pull/743/files
- feat: allow to edit page_size of sub_comments by @mokurin000 in #775
New Contributors
16.2.1b0
修复 get_videos()获得-352返回值 但有待完善,详细讨论见 SocialSisterYi/bilibili-API-collect#868
What's Changed
- fix: 实例化FavoriteList对象后,调用
get_content_video
时缺少mode参数导致的异常 by @kawaiior in #731 - fix: #595 by @Nickszy in #680 and @niu541412 in #699
New Contributors
Full Changelog: 16.2.1...16.2.1b0