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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: bgetlib-3.2.0.tar.gz
  • Upload date:
  • Size: 48.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 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.0.tar.gz
Algorithm Hash digest
SHA256 66a7c6356e00d9665b4b0018b49be011bb3a7b6f17d817ac4357c87fe6687424
MD5 dcca59028473ae19155cf2259522dc64
BLAKE2b-256 03f11130935f72c23ad7e0b617a3b950ba6f4b88e1a3b8a5b389c623ca07f5a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bgetlib-3.2.0-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.10.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be6d70e0c602c6e8769c6973f8330296ebf0d07e4968d55bfdde23cbb00c372a
MD5 91f8891435518d67b22aec105d3bfc16
BLAKE2b-256 9dd6d6ea956987d5ec696c668984f2e62cf87235cf3f8919901686db9053a4cd

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