A BiliBili API library
Project description
bgetlib
bgetlib is a bilibili API library.
Install
pip install bgetlib
Quickstart
import bgetlib
from bgetlib.models import QualityOptions
bapi = bgetlib.BilibiliAPI("bilibili.com_cookies.txt")
# https://space.bilibili.com/36081646/favlist?fid=976082846
videos = bapi.get_favorites_all(976082846)
quality = QualityOptions()
for video in videos:
video_detail = bapi.get_video(video["id"])
for part in video_detail["pages"]:
bapi.save_stream(video_detail["aid"], part["cid"], quality, f"av{video['id']}-P{part['page']}.mp4")
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.2.5.tar.gz
(9.5 kB
view details)
Built Distribution
bgetlib-3.2.5-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file bgetlib-3.2.5.tar.gz
.
File metadata
- Download URL: bgetlib-3.2.5.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.12.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17b9236fd019f502b5e0caaaffde3de64cc7e6c9a3a633a6db1fe03de3d43253 |
|
MD5 | 25196bc3e0ecabd50e82e33d0875ae39 |
|
BLAKE2b-256 | 8ff1fcf58dfbb957409f90173eee9f5ba293cd7b54c4e7e62c9018b87ef4c930 |
File details
Details for the file bgetlib-3.2.5-py3-none-any.whl
.
File metadata
- Download URL: bgetlib-3.2.5-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.12.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad6f0956aecaaaec8900fc9125b0653c7fffaab322ca799c535cdb21cf4836f |
|
MD5 | 1d1bd0a1e1ef27d4ad29f93519d6ee6f |
|
BLAKE2b-256 | 590456d1ef05d2f2fa655f8a1a86219fb08fb0c4ce198ff12b8de7781b4b0383 |