npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bili-audio-downloader

v0.0.6

Published

Download and convert audio from Bilibili

Readme

简体中文 | English | About How to get your cookies/如何获得你的cookie

BiliAudioDownloader

下载 Bilibili 音频

项目介绍

这个项目的核心功能就是把 B 站视频转成音频。

~~目的是为了让本人上下班路上可以有ai东雪莲的曲子听~~

技术和已有功能

可以下载单个视频音频以及合集音频

用的 TypeScript,关于解析 HTML 的部分是源自于 BV1yyN1eMEgj 这个视频的灵感。

不确定 B 站的检测机制,所以下载并发数设置默认为 3,如果下载失败会将失败的数据存起来然后重新下载。

关于 FFmpeg 和路径

程序运行后会在当前路径下自动创建一个 downloads 文件夹,下载的音频会保存在里面。如果输入链接为 B 站合集,则所有音频会存在 downloads 文件夹下新建一个合集名的文件夹。

如果你使用 FFmpeg:

  • 下载的 m4a 格式会自动转码成 mp3 格式
  • Release 里已经自带了一个 FFmpeg,开箱即用
  • 如果需要自己下载 FFmpeg,可以去这里:https://github.com/eugeneware/ffmpeg-static/releases

如果你不用 FFmpeg:

  • 也能正常下载,电脑可以正常播放
  • 但是文件默认是视频格式(虽然只有音轨)
  • 可能有些播放器(比如爱国者和月光宝盒)会无法播放

建议还是用 FFmpeg,这样下载的 mp3 文件兼容性更好~


使用教程

  1. 首先 npm i bili-audio-downloader to download, 然后使用bad指令打开

alt text

1. 找到你的 cookie 并粘贴它

请查看"如何获得你的cookie"页面来获取你的 B 站 Cookie

2. 复制链接并点击回车

单个视频链接示例:

https://www.bilibili.com/video/BV1UBmUBqEDe/?spm_id_from=333.337.search-card.all.click

或者使用合集链接:

复制合集链接,粘贴它,然后点击回车

合集链接示例:

https://space.bilibili.com/1437582453/lists/1235710?type=season