A BiliBili API library
Project description
bgetlib
bgetlib is a bilibili API library.
Install
pip install bgetlib
Quickstart
import bgetlib
bapi = bgetlib.BilibiliAPI("bilibili.com_cookies.txt")
# https://space.bilibili.com/36081646/favlist?fid=976082846
videos = bapi.get_favorites_all(976082846)
for video in videos:
video_detail = bapi.get_video(video["id"])
for part in video_detail["pages"]:
bapi.video_stream_to_file(video_detail["aid"], part["cid"],
"av{}-P{}.mp4".format(video_detail["aid"], part["page"]))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bgetlib-3.1.0.tar.gz
(6.4 kB
view hashes)