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

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


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 details)

Uploaded Source

Built Distribution

bgetlib-3.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bgetlib-3.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 cccf47fac193bdc13b3cd052cca830c5d2871be548e6da40825611d7cf8b0169
MD5 727b2fdcde55562594513dce49defe2c
BLAKE2b-256 097b0e75747b5ecc2669612f5a84805aa50e07cbbc401b0fd9c223ffa9edf281

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bgetlib-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56cb6df94a9d996b99e87caefd3cab7a9dea67cba71a109441ec5fedf6e5a9e7
MD5 c606f690cd896d74b4812755cc943f23
BLAKE2b-256 077668cdd8f634de7fea34f5764a818304bbc2412eeb406e2292a3132de75e16

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