Skip to content

Commit

Permalink
ref: 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhelinCheng committed Apr 24, 2021
1 parent 4d9fad0 commit 12cefe6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
</a>
</p>

> B 站个人动态视频下载助手,支持下载B站个人动态更新的4k视频,运行该程序后,你所关注的UP主更新的视频第一时间下载保存。妈妈再也不担心我没时间下载视频啦!🎉
> B 站个人动态视频下载助手,支持下载 B 站个人动态更新的 4k 视频,运行该程序后,你所关注的 UP 主更新的视频第一时间下载保存。妈妈再也不担心我没时间下载视频啦!🎉
![bilibili-downloader](https://cdn.jsdelivr.net/gh/ZhelinCheng/storage@master/picture/78ZrEH_55.png)

### 🏠 [Homepage](https://github.com/ZhelinCheng/bilibili-downloader#readme)

## 使用

本应用基于 NodeJS 12.19.0 开发,使用前请保证你的 Node 版本大于等于 12。**需要注意的是,只有你是大会员才会下载 4k / 1080 60帧等会员专享清晰度,如果不是大会员只能下载普通1080P清晰度的视频**,本程序不会去突破 B 站的清晰度限制,如果需要保存高清的视频,在活动期间开上一年的大会员,是十分划算的。
本应用基于 NodeJS 12.19.0 开发,使用前请保证你的 Node 版本大于等于 12。**需要注意的是,只有你是大会员才会下载 4k / 1080 60 帧等会员专享清晰度,如果不是大会员只能下载普通 1080P 清晰度的视频**,本程序不会去突破 B 站的清晰度限制,如果需要保存高清的视频,在活动期间开上一年的大会员,是十分划算的。

本程序支持视频保存本地及保存到 FTP 服务器,如何配置将在下面说明。

### 安装

首先你需要[下载NodeJs](https://nodejs.org/en/),进入后选择**LTS**版本。NodeJS会附带自动安装NPM,所以NodeJS安装完成后即可运行程序
首先你需要[下载 NodeJs](https://nodejs.org/en/),进入后选择**LTS**版本。NodeJS 会附带自动安装 NPM,所以 NodeJS 安装完成后即可运行程序

你可以克隆master分支,或者直接到[Releases下载](https://github.com/ZhelinCheng/bilibili-downloader/releases)最新版本解压,进入目录执行:
你可以克隆 master 分支,或者直接到[Releases 下载](https://github.com/ZhelinCheng/bilibili-downloader/releases)最新版本解压,进入目录执行:

```sh
# 使用npm安装依赖
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bilibili-downloader",
"version": "1.0.4",
"description": "B站下载助手",
"version": "1.0.5",
"description": "B 站个人动态视频下载助手,支持下载B站个人动态更新的4k视频,运行该程序后,你所关注的UP主更新的视频第一时间下载保存。",
"main": "./dist/index.js",
"scripts": {
"dev": "nodemon -e ts, js",
Expand All @@ -16,15 +16,14 @@
"url": "git+https://github.com/ZhelinCheng/bilibili-downloader.git"
},
"keywords": [
"kindle",
"txt",
"mobi"
"bilibili",
"downloader"
],
"author": "ZhelinCheng",
"license": "MIT",
"husky": {
"hooks": {
"pre-commit": "lint",
"pre-commit": "npm run lint",
"prepare-commit-msg": "prepare-commit-msg"
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ interface VideoDownloadUrl {
}

// 获取用户是否是大会员
let isVip = false
let isVip = false;
export const getVipStatus = async (): Promise<boolean> => {
try {
const nowTime = Date.now();
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author : Zhelin Cheng
* @Date : 2020-07-30 15:57:41
* @LastEditors : Zhelin Cheng
* @LastEditTime : 2021-04-24 12:54:04
* @LastEditTime : 2021-04-24 14:13:45
* @FilePath : \bilibili-downloader\src\index.ts
* @Description : 入口文件
*/
Expand Down Expand Up @@ -63,7 +63,7 @@ async function bootstrap() {

try {
timer.stop();
// await getVideosUrl();
await getVideosUrl();
await downloader();
const notes = db.get('notes').value();
if (notes.length > 40) {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"strict": true,
"module": "CommonJS",
"declaration": true,
"removeComments": true,
Expand Down

0 comments on commit 12cefe6

Please sign in to comment.