Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 24e5ced

Browse files
authored
build: build version v0.1.1 (#24)
1 parent 6dfbcfc commit 24e5ced

5 files changed

Lines changed: 126 additions & 31 deletions

File tree

README-en.md

Lines changed: 70 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

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

5-
> 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.
5+
> Welcome to use, provide feedback, and contribute to this project via PR. Please do not use it for purposes that violate community guidelines.
66
7-
`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.
7+
`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.
88

99
## Features
1010

@@ -13,19 +13,26 @@
1313
- `logout` Log out
1414
- `check` Check login status
1515
- `upload` Upload videos
16-
- Supports various custom parameters for uploading
17-
- Supports YAML configuration and parsing for video uploads
16+
- Supports various custom parameters for upload
17+
- Supports video upload via YAML configuration and parsing
18+
- Displays upload progress bar
1819
- `download` Download videos
20+
- Supports downloading by `bvid` and `avid`
1921
- Supports downloading danmaku (comments)
2022
- Supports downloading in various qualities
2123
- Supports downloading multi-part videos
24+
- Displays download progress bar
2225
- `ip` Display request IP address
23-
- Supports querying specified IP addresses
24-
- `list` Query the status of past video submissions
26+
- Supports querying specified IP address
27+
- `list` Query the status of past uploaded videos of the account
28+
- Supports querying videos with various statuses
2529
- If a video fails review, the reason will be displayed
26-
- Display published video information (planned support)
27-
- Display upload progress (in development)
28-
- Append videos to existing videos (in development)
30+
- `convert` Convert video IDs
31+
- Supports conversion between `bvid` and `avid`
32+
- `show` Display detailed video information
33+
- Supports viewing basic video information and interaction status data
34+
- Add more detailed log logs (planned support)
35+
- Append videos to existing videos (planned support)
2936

3037
## Usage
3138

@@ -44,18 +51,20 @@ Help information:
4451
```
4552
usage: bilitool [-h] [-V] {login,logout,upload,check,download,list,ip} ...
4653
47-
The Python toolkit package and cli designed for interaction with Bilibili
54+
The Python toolkit package and CLI designed for interaction with Bilibili
4855
4956
positional arguments:
50-
{login,logout,upload,check,download,list,ip}
57+
{login,logout,upload,check,download,list,show,convert,ip}
5158
Subcommands
5259
login Login and save the cookie
5360
logout Logout the current account
5461
upload Upload the video
5562
check Check if the user is logged in
5663
download Download the video
5764
list Get the uploaded video list
58-
ip Get the ip info
65+
show Show the video detailed info
66+
convert Convert between avid and bvid
67+
ip Get the IP info
5968
6069
options:
6170
-h, --help show this help message and exit
@@ -100,7 +109,7 @@ bilitool logout
100109

101110
### Upload
102111

103-
> 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.
112+
> 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.
104113
105114
`bilitool upload -h` prints help information:
106115

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

145154
### Download
146155

147-
> Note: To download videos in high quality or above, you need to log in first to obtain the download.
156+
> Note: To download videos in high definition or above, you need to log in first to obtain the download.
148157
149158
`bilitool download -h` prints help information:
150159

@@ -166,11 +175,11 @@ options:
166175
Example:
167176

168177
```bash
169-
# 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
178+
# 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
170179
bilitool download bvid --danmaku --quality 80 --chunksize 1024 --multiple
171180
```
172181

173-
### Query Recent Video Submission Status
182+
### Query Recent Video Upload Status
174183

175184
`bilitool list -h` prints help information:
176185

@@ -186,12 +195,54 @@ options:
186195
Example:
187196

188197
```bash
189-
# By default, display the recent 20 video submissions
198+
# By default, display information of the 20 most recent uploaded videos
190199
bilitool list
191-
# Query the recent 10 video submissions that failed review
200+
# Query the 10 most recent videos that failed review
192201
bilitool list --size 10 --status not_pubed
193202
```
194203

204+
### Query Detailed Video Information
205+
206+
`bilitool show -h` prints help information:
207+
208+
```
209+
usage: bilitool show [-h] bvid
210+
211+
positional arguments:
212+
vid The avid or bvid of the video
213+
214+
options:
215+
-h, --help show this help message and exit
216+
```
217+
218+
Example:
219+
220+
```bash
221+
# Query detailed video information
222+
bilitool show <bvid or avid>
223+
```
224+
225+
### Convert Video ID
226+
227+
`bilitool convert -h` prints help information:
228+
229+
```
230+
usage: bilitool convert [-h] vid
231+
232+
positional arguments:
233+
vid The avid or bvid of the video
234+
235+
options:
236+
-h, --help show this help message and exit
237+
```
238+
239+
Example:
240+
241+
```bash
242+
# Convert video ID: input bvid to output avid, input avid to output bvid
243+
bilitool convert <bvid or avid>
244+
```
245+
195246
### Query IP Address
196247

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

215266
## Acknowledgments
216267

217-
- Thanks to [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) for providing the API collection.
218-
- Thanks to [biliup-rs](https://github.com/biliup/biliup-rs) for providing direction.
268+
- Thanks to [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) for providing the API collection.

README.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
- 若视频审核未通过,同时会显示原因
3030
- `convert` 查询转换视频编号
3131
- 支持 `bvid``avid` 两种编号互转
32-
- 显示已发布的视频信息(预计支持)
33-
- 添加更详细的 log 信息(预计支持)
32+
- `show` 显示视频详细信息
33+
- 支持查看视频基本信息以及互动状态数据
34+
- 添加更详细的 log 日志(预计支持)
3435
- 追加视频到已有的视频(预计支持)
3536

3637
## 使用方法
@@ -53,14 +54,16 @@ usage: bilitool [-h] [-V] {login,logout,upload,check,download,list,ip} ...
5354
The Python toolkit package and cli designed for interaction with Bilibili
5455
5556
positional arguments:
56-
{login,logout,upload,check,download,list,ip}
57+
{login,logout,upload,check,download,list,show,convert,ip}
5758
Subcommands
5859
login Login and save the cookie
5960
logout Logout the current account
6061
upload Upload the video
6162
check Check if the user is logged in
6263
download Download the video
6364
list Get the uploaded video list
65+
show Show the video detailed info
66+
convert Convert between avid and bvid
6467
ip Get the ip info
6568
6669
options:
@@ -198,6 +201,48 @@ bilitool list
198201
bilitool list --size 10 --status not_pubed
199202
```
200203
204+
### 查询视频详细信息
205+
206+
`bilitool show -h ` 打印帮助信息:
207+
208+
```bash
209+
usage: bilitool show [-h] bvid
210+
211+
positional arguments:
212+
vid The avid or bvid of the video
213+
214+
options:
215+
-h, --help show this help message and exit
216+
```
217+
218+
示例:
219+
220+
```bash
221+
# 查询视频详细信息
222+
bilitool show <bvid or avid>
223+
```
224+
225+
### 查询转换视频编号
226+
227+
`bilitool convert -h ` 打印帮助信息:
228+
229+
```bash
230+
usage: bilitool convert [-h] vid
231+
232+
positional arguments:
233+
vid The avid or bvid of the video
234+
235+
options:
236+
-h, --help show this help message and exit
237+
```
238+
239+
示例:
240+
241+
```bash
242+
# 转换视频编号:输入 bvid 输出 avid,输入 avid 输出 bvid
243+
bilitool convert <bvid or avid>
244+
```
245+
201246
### 查询 IP 地址
202247
203248
`bilitool ip -h ` 打印帮助信息:
@@ -221,4 +266,3 @@ bilitool ip --ip 8.8.8.8
221266
## Acknowledgments
222267
223268
- 感谢 [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) 提供的 API 集合。
224-
- 感谢 [biliup-rs](https://github.com/biliup/biliup-rs) 提供的方向。

bilitool/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def cli():
2323
level=logging.INFO
2424
)
2525
parser = argparse.ArgumentParser(description='The Python toolkit package and cli designed for interaction with Bilibili')
26-
parser.add_argument('-V', '--version', action='version', version='bilitool 0.1.0', help='Print version information')
26+
parser.add_argument('-V', '--version', action='version', version='bilitool 0.1.1', help='Print version information')
2727

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

@@ -65,14 +65,14 @@ def cli():
6565
list_parser.add_argument('--size', type=int, default=20, help='(default is 20) the size of video list')
6666
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')
6767

68-
# Convert subcommand
69-
convert_parser = subparsers.add_parser('convert', help='Convert between avid and bvid')
70-
convert_parser.add_argument('vid', help='The avid or bvid of the video')
71-
7268
# Show subcommand
7369
show_parser = subparsers.add_parser('show', help='Show the video detailed info')
7470
show_parser.add_argument('vid', help='The avid or bvid of the video')
7571

72+
# Convert subcommand
73+
convert_parser = subparsers.add_parser('convert', help='Convert between avid and bvid')
74+
convert_parser.add_argument('vid', help='The avid or bvid of the video')
75+
7676
# IP subcommand
7777
ip_parser = subparsers.add_parser('ip', help='Get the ip info')
7878
ip_parser.add_argument('--ip', default='', help='(default is your request ip) The ip address')

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "bilitool" # make sure your module name is unique
7-
version = "0.1.0"
7+
version = "0.1.1"
88
authors = [
99
{ name="timerring"},
1010
]

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
PyYAML==6.0.2
22
qrcode==8.0
3-
Requests==2.32.3
3+
Requests==2.32.3
4+
tqdm==4.67.1

0 commit comments

Comments
 (0)