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 🙏

© 2025 – Pkg Stats / Ryan Hefner

downbili

v0.3.8

Published

fock ibili 下载视频

Readme

downBili

B 站 URL 下载视频

仅供交流学习使用

严重警告:不可以将获取的资源用于恶意用途

Installing

包管理

Using pnpm:

pnpm install downbili

Using npm:

npm install downbili

Using yarn:

yarn add downbili

Get started

downBili

import { downBili } from 'downbili';

option

| 参数 | 描述 | | ---------- | --------------------------------------------------------------- | | url | 视频 URL | | level | 112 是 1080P+,80 是 1080P,64 是 720P+,32 是 480P,16 是 360P | | sessdata | 你的 sessdata | | name | 文件名称(自己获取) | | type | 视频类型 | | fileName | 文件名称 | | folder | folder | | onComplete | 执行成功的回调 | | format | 转成音频的格式 | | output | 输出下载内容路径 |

result

| 参数 | 描述 | | --------- | -------------------- | | fPath | 下载完成后的视频路径 | | cwd | process.cwd | | name | 视频名称 | | mediaPath | 带 media 文件夹路径 |

仅下载视频

默认下载到当前目录/media

import { downBili, Option } from 'downbili';

const opt: Option = {
  // 下载地址
  url: 'https://www.bilibili.com/video/xxx',
  level: 80,
  // 大会员使用 提高下载视频质量
  sessdata: '',
};
const result = await downBili(opt);
console.log('res', result);

选择下载目录目录

import { downBili, Option } from 'downbili';
import path from 'path';

const output = path.join(process.cwd());
const opt: Option = {
  // 下载地址
  url: 'https://www.bilibili.com/video/xxx',
  level: 80,
  output,
};
const result = await downBili(opt);
console.log('result', result);

将视频转换成音频

import { downBili, Option, AudioFormatEnum } from 'downbili';

const opt: Option = {
  // 传入format
  format: AudioFormatEnum.WAV,
  url: 'https://www.bilibili.com/video/xxx',
  sessdata: '',
};
const result = await downBili(opt);
console.log('result', result);

不传入配置

只下载到默认目录, /media

import { downBili } from 'downbili';

const url = 'https://www.bilibili.com/video/xxx';
await downBili(url);

或者需要转成音频

import { downBili, AudioFormatEnum } from 'downbili';

const url = 'https://www.bilibili.com/video/xxx';
await downBili(url, AudioFormatEnum.MP3);