Giter VIP home page Giter VIP logo

bilifm's Introduction

📻 BiliFM: Best BiliBili Audio Downloader

PyPI PyPI - Python Version PyPI - License pdm-managed

Intro

An script to download all audios of the Bilibili uploader you love.
轻松下载指定up主全部或指定的视频音频。

Install

pip install BiliFM --upgrade

或在本地使用并安装依赖

pip install -r requirements.txt

Usage

使用实例:

uid 模式

bilifm uid 261485584
uid = "261485584" # uid 为up主的uid

bv 模式

Note
bv 模式现已支持多 P 下载,使用方式和普通 bv 模式相同
同理,其他模式的下载也支持分 P 视频

bilifm bv BV1k341187
bvid = "BV1k341187" # bvid 是要下载的音频的视频bv号

fav 模式

bilifm fav 69361944 cookies.json
media_id = "69361954" # media_id 是收藏夹的 media_id,注意不要和 uid/fid 弄混
cookies_path = "cookies.json" # cookies 是保存 cookies 的文件路径,注意需要转换为 json

media_id 的获取:

media_id

cookies 的获取:

season 模式

下载视频合集

bilifm season $uid $sid [OPTIONS]

Features

  • python 版本限制未知

    • 在函数定义时使用了类型注解,故不建议使用 3.5 以下版本
  • 接口简洁方便调用

@app.command()
def bv(bv: str):
    audio = Audio(bv)
    audio.download()


@app.command()
def uid(uid: str):
    user = User(uid)

    for video in user.videos:
        bv = video["bvid"]
        audio = Audio(bv)
        audio.download()

    typer.echo("Download complete")

Issues

  • 获取 UP 主视频列表时会出现 UnicodeDecodeError,原因未知
    • 初步判断是网络不稳定所致,在稳定的网络环境下没有出现此问题
    • 暂时采用 try-except 跳过这一过程
  • 在使用前需关闭代理

Licence

  • bilibiliaudioDownloader 的作者没有选取许可证,暂时选择 MIT License
  • bilibiliAudioDownloader 的作者已添加 GPL-3.0 License,故本项目亦修改为 GPL-3.0

Thanks

感谢以下产品对 BiliFM 的赞助:

https://www.jetbrains.com

bilifm's People

Contributors

jingfelix avatar dependabot[bot] avatar robo-dani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.