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.8.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

bgetlib-3.2.8-py3-none-any.whl (11.0 kB view hashes)

Uploaded Python 3

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