Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
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
2 changes: 1 addition & 1 deletion README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ LoginController().logout_bilibili()
LoginController().check_bilibili_login()

# Upload
UploadController().upload_video_entry(video_path: str, yaml: str, line: str, copyright: int, tid: int, title: str, desc: str, tag: str, source: str, cover: str, dynamic: str, cdn: str)
UploadController().upload_video_entry(video_path: str, yaml: str, line: str, tid: int, title: str, desc: str, tag: str, source: str, cover: str, dynamic: str, cdn: str)

# Append
UploadController().append_video_entry(video_path: str, bvid: str, cdn: str)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ LoginController().logout_bilibili()
LoginController().check_bilibili_login()

# 上传
UploadController().upload_video_entry(video_path: str, yaml: str, copyright: int, tid: int, title: str, desc: str, tag: str, source: str, cover: str, dynamic: str, cdn: str)
UploadController().upload_video_entry(video_path: str, yaml: str, tid: int, title: str, desc: str, tag: str, source: str, cover: str, dynamic: str, cdn: str)

# 追加投稿(分p)
UploadController().append_video_entry(video_path: str, bvid: str, cdn: str)
Expand Down
7 changes: 0 additions & 7 deletions bilitool/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ def cli():
default="",
help="The path to yaml file(if yaml file is provided, the arguments below will be ignored)",
)
upload_parser.add_argument(
"--copyright",
type=int,
default=2,
help="(default is 2) 1 for original, 2 for reprint",
)
upload_parser.add_argument(
"--title", default="", help="(default is video name) The title of video"
)
Expand Down Expand Up @@ -200,7 +194,6 @@ def cli():
UploadController().upload_video_entry(
args.video_path,
args.yaml,
args.copyright,
args.tid,
args.title,
args.desc,
Expand Down
6 changes: 2 additions & 4 deletions bilitool/controller/upload_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ def __init__(self):

@staticmethod
def package_upload_metadata(
copyright, tid, title, desc, tag, source, cover, dynamic
tid, title, desc, tag, source, cover, dynamic
):
return {
"copyright": copyright,
"tid": tid,
"title": title,
"desc": desc,
Expand Down Expand Up @@ -138,7 +137,6 @@ def upload_video_entry(
self,
video_path,
yaml,
copyright,
tid,
title,
desc,
Expand All @@ -153,7 +151,7 @@ def upload_video_entry(
upload_metadata = self.package_upload_metadata(*parse_yaml(yaml))
else:
upload_metadata = self.package_upload_metadata(
copyright, tid, title, desc, tag, source, cover, dynamic
tid, title, desc, tag, source, cover, dynamic
)
if upload_metadata["cover"]:
upload_metadata["cover"] = self.bili_uploader.cover_up(
Expand Down
3 changes: 1 addition & 2 deletions bilitool/utils/parse_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ def parse_yaml(yaml_path):
data = yaml.safe_load(file)

# Assuming there's only one streamer entry
copyright = data.get("copyright")
tid = data.get("tid")
title = data.get("title")
desc = data.get("desc")
tag = data.get("tag")
source = data.get("source")
cover = data.get("cover")
dynamic = data.get("dynamic")
return copyright, tid, title, desc, tag, source, cover, dynamic
return tid, title, desc, tag, source, cover, dynamic


if __name__ == "__main__":
Expand Down
4 changes: 1 addition & 3 deletions docs/upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
`bilitool upload -h ` 打印帮助信息:

```bash
usage: bilitool upload [-h] [-y YAML] [--copyright COPYRIGHT] [--title TITLE] [--desc DESC] [--tid TID] [--tag TAG] [--source SOURCE] [--cover COVER]
usage: bilitool upload [-h] [-y YAML] [--title TITLE] [--desc DESC] [--tid TID] [--tag TAG] [--source SOURCE] [--cover COVER]
[--dynamic DYNAMIC]
video_path

Expand All @@ -15,8 +15,6 @@ positional arguments:
options:
-h, --help show this help message and exit
-y YAML, --yaml YAML The path to yaml file(if yaml file is provided, the arguments below will be ignored)
--copyright COPYRIGHT
(default is 2) 1 for original, 2 for reprint
--title TITLE (default is video name) The title of video
--desc DESC (default is empty) The description of video
--tid TID (default is 138) For more info to the type id, refer to https://biliup.github.io/tid-ref.html
Expand Down
1 change: 0 additions & 1 deletion template/example-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
copyright: 1 # the copyright of video (1 for original, 2 for reprint)
source: https://live.bilibili.com/xxxxxxxx # the source of video (required if your video is re-print)
title: "your video title"
desc: "your video description"
Expand Down