File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed
Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,12 @@ pip install -r requirements.txt
137137
138138在配置文件 ` src/config.py ` 中,` SLICE_DURATION ` 以秒为单位设置切片时长(不建议超过 1 分钟),在项目的自动切片功能需要使用到智谱的 [ ` GLM-4V-PLUS ` ] ( https://bigmodel.cn/dev/api/normal-model/glm-4 ) 模型,请自行[ 注册账号] ( https://www.bigmodel.cn/invite?icode=shBtZUfNE6FfdMH1R6NybGczbXFgPRGIalpycrEwJ28%3D ) 并申请 API Key,填写到 ` src/config.py ` 文件中对应的 ` Your_API_KEY ` 中。
139139
140- #### 4. biliup-rs 登录
140+ #### 4. biliup & bilitool 登录
141141
142142首先按照 [ biliup-rs] ( https://github.com/biliup/biliup-rs ) 登录b站,登录脚本在 ` src/upload/biliup ` ,登录产生的` cookies.json ` 保留在该文件夹下即可。
143143
144+ 然后同样通过 ` bilitool login ` 扫码登录(biliup 的 list 对应 api 已经失效,因此我写了 [ bilitool] ( https://github.com/timerring/bilitool ) 工具作为替换)。
145+
144146[ 常见问题收集] ( https://timerring.github.io/bilive/biliup.html )
145147
146148#### 5. 启动自动录制
Original file line number Diff line number Diff line change @@ -11,4 +11,5 @@ tiktoken==0.4.0
1111torch == 1.11.0
1212triton == 3.1.0
1313zhconv == 1.4.3
14+ bilitool
1415zhipuai
Original file line number Diff line number Diff line change 88# ============================ Your configuration ============================
99GPU_EXIST = False
1010# Can be pipeline, append, merge
11- MODEL_TYPE = "pipeline "
11+ MODEL_TYPE = "append "
1212Inference_Model = "small"
1313# ============================ The video slice configuration ==================
1414AUTO_SLICE = False
Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ def upload_video(upload_path, yaml_file_path):
6161def find_bv_number (target_str , my_list ):
6262 for element in my_list :
6363 if target_str in element :
64- parts = element .split ('\t ' )
64+ parts = element .split ('| ' )
6565 if len (parts ) > 0 :
66- return parts [0 ]
66+ return parts [1 ]. strip ()
6767 return None
6868
6969def read_append_and_delete_lines (file_path ):
@@ -97,10 +97,10 @@ def read_append_and_delete_lines(file_path):
9797 return
9898 else :
9999 query = generate_title (upload_video_path )
100- result = subprocess .check_output (f"{ SRC_DIR } /upload/biliup" + " -u " + f"{ SRC_DIR } /upload/cookies.json" + " list" , shell = True )
100+ result = subprocess .check_output ("bilitool" + " list" , shell = True )
101+ # print(result.decode("utf-8"), flush=True)
101102 upload_list = result .decode ("utf-8" ).splitlines ()
102- limit_list = upload_list [:30 ]
103- bv_result = find_bv_number (query , limit_list )
103+ bv_result = find_bv_number (query , upload_list )
104104 if bv_result :
105105 print (f"BV number is: { bv_result } " , flush = True )
106106 append_upload (upload_video_path , bv_result )
You can’t perform that action at this time.
0 commit comments