8000 build: build version v0.1.1 by timerring · Pull Request #24 · timerring/bilitool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

build: build version v0.1.1 #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 70 additions & 20 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

[简体中文](./README.md) | English

> Welcome to use, feel free to provide feedback, and contribute to this project via PR. Please do not use it for any purpose that violates the community rules.
> Welcome to use, provide feedback, and contribute to this project via PR. Please do not use it for purposes that violate community guidelines.

`bilitool` is a Python toolkit for logging in, downloading videos, uploading videos to Bilibili, and more. It can be operated via command-line CLI or used as a library in other projects.
`bilitool` is a Python toolkit that provides functionalities such as persistent login, video download, and video upload to Bilibili. It can be operated via command-line interface (CLI) or used as a library in other projects.

## Features

Expand All @@ -13,19 +13,26 @@
- `logout` Log out
- `check` Check login status
- `upload` Upload videos
- Supports various custom parameters for uploading
- Supports YAML configuration and parsing for video uploads
- Supports various custom parameters for upload
- Supports video upload via YAML configuration and parsing
- Displays upload progress bar
- `download` Download videos
- Supports downloading by `bvid` and `avid`
- Supports downloading danmaku (comments)
- Supports downloading in various qualities
- Supports downloading multi-part videos
- Displays download progress bar
- `ip` Display request IP address
- Supports querying specified IP addresses
- `list` Query the status of past video submissions
- Supports querying specified IP address
- `list` Query the status of past uploaded videos of the account
- Supports querying videos with various statuses
- If a video fails review, the reason will be displayed
- Display published video information (planned support)
- Display upload progress (in development)
- Append videos to existing videos (in development)
- `convert` Convert video IDs
- Supports conversion between `bvid` and `avid`
- `show` Display detailed video information
- Supports viewing basic video information and interaction status data
- Add more detailed log logs (planned support)
- Append videos to existing videos (planned support)

## Usage

Expand All @@ -44,18 +51,20 @@ Help information:
```
usage: bilitool [-h] [-V] {login,logout,upload,check,download,list,ip} ...

The Python toolkit package and cli designed for interaction with Bilibili
The Python toolkit package and CLI designed for interaction with Bilibili

positional arguments:
{login,logout,upload,check,download,list,ip}
{login,logout,upload,check,download,list,show,convert,ip}
Subcommands
login Login and save the cookie
logout Logout the current account
upload Upload the video
check Check if the user is logged in
download Download the video
list Get the uploaded video list
ip Get the ip info
show Show the video detailed info
convert Convert between avid and bvid
ip Get the IP info

options:
-h, --help show this help message and exit
Expand Down Expand Up @@ -100,7 +109,7 @@ bilitool logout

### Upload

> Note: The upload function requires login first. After logging in, the login status will be remembered, so you don't need to log in again for the next upload.
> Note: The upload function requires login first. After logging in, the login status will be remembered, and you won't need to log in again for the next upload.

`bilitool upload -h` prints help information:

Expand Down Expand Up @@ -144,7 +153,7 @@ bilitool upload /path/to/your/video.mp4 -y /path/to/your/upload/template.yaml

### Download

> Note: To download videos in high quality or above, you need to log in first to obtain the download.
> Note: To download videos in high definition or above, you need to log in first to obtain the download.

`bilitool download -h` prints help information:

Expand All @@ -166,11 +175,11 @@ options:
Example:

```bash
# Download the video with bvid, download danmaku, set quality to 1080p HD, chunk size to 1024, and download all videos if there are multiple parts
# Download the video with the bvid, download danmaku, set quality to 1080p HD, chunk size to 1024, and download all videos if there are multiple parts
bilitool download bvid --danmaku --quality 80 --chunksize 1024 --multiple
```

### Query Recent Video Submission Status
### Query Recent Video Upload Status

`bilitool list -h` prints help information:

Expand All @@ -186,12 +195,54 @@ options:
Example:

```bash
# By default, display the recent 20 video submissions
# By default, display information of the 20 most recent uploaded videos
bilitool list
# Query the recent 10 video submissions that failed review
# Query the 10 most recent videos that failed review
bilitool list --size 10 --status not_pubed
```

### Query Detailed Video Information

`bilitool show -h` prints help information:

```
usage: bilitool show [-h] bvid

positional arguments:
vid The avid or bvid of the video

options:
-h, --help show this help message and exit
```

Example:

```bash
# Query detailed video information
bilitool show <bvid or avid>
```

### Convert Video ID

`bilitool convert -h` prints help information:

```
usage: bilitool convert [-h] vid

positional arguments:
vid The avid or bvid of the video

options:
-h, --help show this help message and exit
```

Example:

```bash
# Convert video ID: input bvid to output avid, input avid to output bvid
bilitool convert <bvid or avid>
```

### Query IP Address

`bilitool ip -h` prints help information:
Expand All @@ -214,5 +265,4 @@ bilitool ip --ip 8.8.8.8

## Acknowledgments

- Thanks to [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) for providing the API collection.
- Thanks to [biliup-rs](https://github.com/biliup/biliup-rs) for providing direction.
- Thanks to [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) for providing the API collection.
52 changes: 48 additions & 4 deletions README.md
6DB6
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
- 若视频审核未通过,同时会显示原因
- `convert` 查询转换视频编号
- 支持 `bvid` 和 `avid` 两种编号互转
- 显示已发布的视频信息(预计支持)
- 添加更详细的 log 信息(预计支持)
- `show` 显示视频详细信息
- 支持查看视频基本信息以及互动状态数据
- 添加更详细的 log 日志(预计支持)
- 追加视频到已有的视频(预计支持)

## 使用方法
Expand All @@ -53,14 +54,16 @@ usage: bilitool [-h] [-V] {login,logout,upload,check,download,list,ip} ...
The Python toolkit package and cli designed for interaction with Bilibili

positional arguments:
{login,logout,upload,check,download,list,ip}
{login,logout,upload,check,download,list,show,convert,ip}
Subcommands
login Login and save the cookie
logout Logout the current account
upload Upload the video
check Check if the user is logged in
download Download the video
list Get the uploaded video list
show Show the video detailed info
convert Convert between avid and bvid
ip Get the ip info

options:
Expand Down Expand Up @@ -198,6 +201,48 @@ bilitool list
bilitool list --size 10 --status not_pubed
```

### 查询视频详细信息

`bilitool show -h ` 打印帮助信息:

```bash
usage: bilitool show [-h] bvid

positional arguments:
vid The avid or bvid of the video

options:
-h, --help show this help message and exit
```

示例:

```bash
# 查询视频详细信息
bilitool show <bvid or avid>
```

### 查询转换视频编号

`bilitool convert -h ` 打印帮助信息:

```bash
usage: bilitool convert [-h] vid

positional arguments:
vid The avid or bvid of the video

options:
-h, --help show this help message and exit
```

示例:

```bash
# 转换视频编号:输入 bvid 输出 avid,输入 avid 输出 bvid
bilitool convert <bvid or avid>
```

### 查询 IP 地址

`bilitool ip -h ` 打印帮助信息:
Expand All @@ -221,4 +266,3 @@ bilitool ip --ip 8.8.8.8
## Acknowledgments

- 感谢 [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) 提供的 API 集合。
- 感谢 [biliup-rs](https://github.com/biliup/biliup-rs) 提供的方向。
10 changes: 5 additions & 5 deletions bilitool/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def cli():
level=logging.INFO
)
parser = argparse.ArgumentParser(description='The Python toolkit package and cli designed for interaction with Bilibili')
parser.add_argument('-V', '--version', action='version', version='bilitool 0.1.0', help='Print version information')
parser.add_argument('-V', '--version', action='version', version='bilitool 0.1.1', help='Print version information')

subparsers = parser.add_subparsers(dest='subcommand', help='Subcommands')

Expand Down Expand Up @@ -65,14 +65,14 @@ def cli():
list_parser.add_argument('--size', type=int, default=20, help='(default is 20) the size of video list')
list_parser.add_argument('--status', default='pubed,not_pubed,is_pubing', help='(default is all) the status of video list: pubed, not_pubed, is_pubing')

# Convert subcommand
convert_parser = subparsers.add_parser('convert', help='Convert between avid and bvid')
convert_parser.add_argument('vid', help='The avid or bvid of the video')

# Show subcommand
show_parser = subparsers.add_parser('show', help='Show the video detailed info')
show_parser.add_argument('vid', help='The avid or bvid of the video')

# Convert subcommand
convert_parser = subparsers.add_parser('convert', help='Convert between avid and bvid')
convert_parser.add_argument('vid', help='The avid or bvid of the video')

# IP subcommand
ip_parser = subparsers.add_parser('ip', help='Get the ip info')
ip_parser.add_argument('--ip', default='', help='(default is your request ip) The ip address')
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "bilitool" # make sure your module name is unique
version = "0.1.0"
version = "0.1.1"
authors = [
{ name="timerring"},
]
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
PyYAML==6.0.2
qrcode==8.0
Requests==2.32.3
Requests==2.32.3
tqdm==4.67.1
0