配置环境
系统环境: Ubuntu-22.04-amd64
用户: root
(可选)国内主机换清华源
sudo sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
|
修复libssl.so.1.1: cannot open shared object file
由于Ubuntu 22.04 默认使用openssl3.0.* ,但大多为Ubuntu生成的可执行文件依赖openssl 1.1
wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz && tar xvf openssl-1.1.1q.tar.gz && cd openssl-1.1.1q && apt install -y perl gcc make && ./config && make && make install && echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib" >> /etc/profile && source /etc/profile
|
更新并获取所需软件包
apt-get update && apt-get upgrade -y && apt install python3-dev python3-pip ffmpeg nodejs -y && pip3 install biliup quickjs certifi mkdir /root/biliup && cd /root/biliup wget -O biliupR.tar.xz https://github.com/biliup/biliup-rs/releases/download/$(curl -Ls "https://api.github.com/repos/biliup/biliup-rs/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')/biliupR-$(curl -Ls "https://api.github.com/repos/biliup/biliup-rs/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')-x86_64-linux.tar.xz && tar -xvf biliupR.tar.xz && mv -fb ./biliupR*/* ./ && rm -rf ./biliupR*
vim config.toml ```
```bash
lines = "AUTO" threads = 3 file_size = 2621440000 filtering_threshold = 20 delay = 10 event_loop_interval = 40 checker_sleep = 15 pool1_size = 3 pool2_size = 3 check_sourcecode = 15 [user] douyin_cookie = '__ac_nonce=123456; __ac_signature=123456;' [streamers."星际2Stats拔本神族天梯第一视角"] url = ["https://www.twitch.tv/kimdaeyeob3"] [streamers."星际2INnoVation吕布卫星人族天梯第一视角"] url = [ "https://www.twitch.tv/innovation_s2", "https://www.panda.tv/1160340" ] title = "{title}第一视角%Y-%m-%d{streamers}" tid = 171 copyright = 2 description = """ 视频简介: {title} %Y-%m-%d %H:%M:%S{streamers} --- Powered By biliup - Github: https://github.com/ForgQi/biliup""" dynamic = "#空间动态#" uploader = "biliup-rs" user_cookie = "cookies.json" tags = [ "biliup", "视频标签" ] [LOGGING.formatters.verbose] format = "%(asctime)s %(filename)s[line:%(lineno)d](Pid:%(process)d Tname:%(threadName)s) %(levelname)s %(message)s" datefmt = "%Y-%m-%d %H:%M:%S" [LOGGING.formatters.simple] format = "%(filename)s%(lineno)d[%(levelname)s]Tname:%(threadName)s %(message)s" [LOGGING.handlers.console] level = "DEBUG" class = "logging.StreamHandler" formatter = "simple" stream = "ext://sys.stdout" [LOGGING.handlers.file] level = "DEBUG" class = "biliup.common.log.SafeRotatingFileHandler" when = "W0" interval = 1 backupCount = 1 filename = "ds_update.log" formatter = "verbose" [LOGGING.root] handlers = [ "console" ] level = "INFO" [LOGGING.loggers.biliup] handlers = [ "file" ] level = "INFO"
|
biliup开启边录边传
echo n | pip3 uninstall biliup cd path to biliup vim handler.py 输入 / def modify(self, url): 回车 定位到modify模块 将 if self.url_status[url] == 2: return logger.debug('正在上传稍后下载') 注释(在句首加#)
|
使用biliup-rs配置cookies.json 并启动biliup
./biliup login biliup start
|
一些命令
ps -A | grep biliup
biliup start
biliup stop
biliup restart
biliup --version
biliup -h
biliup --http start
biliup --config ./config.yaml start
pip3 install --upgrade biliup
biliup help upload USAGE: biliup.exe upload [OPTIONS] [VIDEO_PATH]...
ARGS: <VIDEO_PATH>... 需要上传的视频路径,若指定配置文件投稿不需要此参数
OPTIONS: -c, --config <FILE> Sets a custom config file --copyright <COPYRIGHT> 是否转载 1 原创 2 转载 [default: 1] --cover <COVER> 视频封面 --desc <DESC> 视频简介 --dtime <DTIME> 延时发布时间,距离提交大于4小时,格式为10位时间戳 --dynamic <DYNAMIC> 空间动态 -h, --help Print help information -l, --line <LINE> 上传线路,支持kodo, bda2, qn, ws --limit <LIMIT> 单视频文件最大并发数 [default: 3] --source <SOURCE> 是转载来源 --tag <TAG> 视频标签 --tid <TID> 投稿分区 [default: 171] --title <TITLE> 视频标题
|