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.1.tar.gz (48.5 MB view details)

Uploaded Source

Built Distribution

bgetlib-3.2.1-py3-none-any.whl (48.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bgetlib-3.2.1.tar.gz
  • Upload date:
  • Size: 48.5 MB
  • 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.1.tar.gz
Algorithm Hash digest
SHA256 c2ccd1ee46d72b95eb9478943f42f90556e78c458f4ce3c15f5b0ec00adc1712
MD5 e05452769bcc853628f57406b46cb56d
BLAKE2b-256 6ef8898941ee28f0856865c4fc7e889bfc7b75417ddb5eb9c3cfb2e27ef801de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bgetlib-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 48.7 MB
  • 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 845dfd7c20fdeaca8653680a2241f0a6d5003cad38d961c4aedd39289ac4bb59
MD5 5c8daa70bbe15fba33a9e7bf68a2f8ae
BLAKE2b-256 688354ed3ea7b7427c617c7954524ca36879fbd513bfd95f354f56076d7a9d6e

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