Skip to main content

A BiliBili API library

Project description

bgetlib

Documentation Changelog Version Issues License

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


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.2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

bgetlib-3.2.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file bgetlib-3.2.2.tar.gz.

File metadata

  • Download URL: bgetlib-3.2.2.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for bgetlib-3.2.2.tar.gz
Algorithm Hash digest
SHA256 049940f5bd2a65ddf79727fdf3c1a6325a5f4864f960cf2bf51ef5f1d46f6f53
MD5 3201618251857fe977e2f542335de6ee
BLAKE2b-256 b76e1c8a7932a85e3369fa87ab66b7432275916339732cf2bb7a223e4deb6da6

See more details on using hashes here.

File details

Details for the file bgetlib-3.2.2-py3-none-any.whl.

File metadata

  • Download URL: bgetlib-3.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for bgetlib-3.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cbc2210ae084018642b32ccd8466856e59138f7abf0d793e05ec7085408cf543
MD5 7baa0820f63ebd38db465e5845dbdfa3
BLAKE2b-256 b54bcf96001dbdde185a401cf7378399ec4089fb4b650a4c7cd4eba3aea0b458

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page