GithubHelp home page GithubHelp logo

kiritomo / bilibiliuploader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fortunedayssss/bilibiliuploader

0.0 0.0 0.0 14 KB

模拟Bilibili windows投稿客户端

License: MIT License

Python 100.00%

bilibiliuploader's Introduction

BilibiliUploader

模拟B站pc投稿工具进行投稿

Example

from bilibiliuploader.bilibiliuploader import BilibiliUploader
from bilibiliuploader.core import VideoPart

if __name__ == '__main__':
    uploader = BilibiliUploader()
    uploader.login("username_example", "password_example")

    parts = []
    parts.append(VideoPart(
        path="C:/Users/xxx/Videos/1.mp4",
        title="分p名:p1",
        desc="这里是p1的简介"
    ))
    parts.append(VideoPart(
        path="C:/Users/xxx/Videos/2.mp4",
        title="分p名:p2",
        desc="这里是p2的简介"
    ))
    uploader.upload(
        parts=parts,
        copyright=2,
        title='py多p上传测试1',
        tid=171,
        tag=",".join(["python", "测试"]),
        desc="python多p上传测试",
        source='https://www.github.com/FortuneDayssss',
        thread_pool_workers=5,
    )

Parameters && Structures

VideoPart

VideoPart代表投稿内各个分p

path:上传的文件路径

title:分p标题

desc:分p简介

server_file_name:pre_upload API自动生成的服务端文件名,不需要填写

Upload

parts:VideoPart结构体

copyright: int 版权标志,1为原创2为转载,转载投稿需要填写下面的source参数

title: str 投稿标题

tid: int 投稿分区号

tag: str 以半角逗号分割的字符串

desc: str 视频简介

source: int, 转载地址

cover: int, 封面,TODO(暂时鸽了有时间再做)

no_reprint: int = 0,视频是否禁止转载标志0无1禁止

open_elec: int = 1,是否开启充电面板,0为关闭1为开启

max_retry: int = 5 上传重试次数

thread_pool_workers: int = 1 多视频并行上传最大线程数,默认为串行上传

关于投稿分区tid号码可以从这里查询: https://github.com/uupers/BiliSpider/wiki/%E8%A7%86%E9%A2%91%E5%88%86%E5%8C%BA%E5%AF%B9%E5%BA%94%E8%A1%A8

reference

记一次B站投稿工具逆向.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.