Skip to main content

Login and upload videos to bilibili

Project description

biliupload

简体中文 | English

这是一个 python 版本实现的 biliup-rs

biliupload 是一个 python 的命令行工具,用于登录和上传视频到 bilibili,也可以作为其他项目的库使用。

功能

  • 保存 cookies.json 用于 bilibili 登录
  • 上传视频
  • 支持上传视频的 yaml 配置
  • 追加视频到已有的视频(正在开发)
  • 显示已发布的视频信息(预计支持)
  • 下载视频(预计支持)
  • 更新 cookies(预计支持)
  • 显示上传进度(预计支持)

目前我实现了 loginupload 功能,并会继续实现其他功能。欢迎使用并给我更多反馈。欢迎贡献此项目。

使用方法

安装

推荐 Python 版本 >= 3.10.

pip install biliupload

或者你也可以下载编译好的 cli 工具直接运行 下载地址

帮助信息:

usage: biliupload [-h] [-V] {login,upload} ...

Python implementation of biliup

positional arguments:
  {login,upload}  Subcommands
    login         login and save the cookies
    upload        upload the video

options:
  -h, --help      show this help message and exit
  -V, --version   Print version information

登录

biliupload login

然后你可以扫描二维码或点击链接登录,cookie.json 将保存在当前目录。

上传

biliupload upload -h 打印帮助信息:

$ biliupload upload -h
usage: biliupload upload [-h] -c COOKIES [-y YAML] [--copyright COPYRIGHT] [--title TITLE] [--desc DESC] [--tid TID] [--tag TAG] [--line LINE] video_path

positional arguments:
  video_path            (required) the path to video file

options:
  -h, --help            show this help message and exit
  -c COOKIES, --cookies COOKIES
                        The path to cookies
  -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
  --tag TAG             (default is biliupload) video tags, separated by comma
  --line LINE           (default is bda2) line refer to https://biliup.github.io/upload-systems-analysis.html

示例:

你可以参考 template/example-config.yaml 了解更多的 yaml 模板。

# 视频路径和 cookie 路径是必需的
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json

# 使用命令行参数上传视频
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json --title "test" --desc "test" --tid 138 --tag "test" --line bda2

# 使用 yaml 配置上传视频
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json -y /path/to/your/upload/template.yaml

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biliupload-0.0.2.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biliupload-0.0.2-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file biliupload-0.0.2.tar.gz.

File metadata

  • Download URL: biliupload-0.0.2.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for biliupload-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6f1bb3229bfd1a1f5495e09f802b71ef1c9d979158fcd1a3e8cec27e61993222
MD5 5d08829ef2aeb46e7e6cc4b0acf574af
BLAKE2b-256 0ba78b633dd2a6e6c0c315a6c45c8e406693b2f6d925f8aa84a4efc4fa604963

See more details on using hashes here.

File details

Details for the file biliupload-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: biliupload-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for biliupload-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ec7297a191fe5610b4815211bdcc48801adcb4c01d5211659d237f60f065188
MD5 364689356cd3122c524bcf71a7fb480f
BLAKE2b-256 e4baa39118f4e6082edf3799a49ed92b6f831c5f9f89756ea0c09460bb70a954

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page