修复报错与读取配置文件参数(#517) (#522)

* 修复文件报错

* 传值
This commit is contained in:
Kataick authored and GitHub committed 2023-07-14 09:32:49 +00:00
1 parent ec8071d8b5
commit 65ac8b9529
2 files changed
+6 -3

No files matched your search

+2 -2
View File
@@ -11,7 +11,7 @@ class BiliWeb(UploadBase):
def __init__(
self, principal, data, submit_api=None, copyright=2, postprocessor=None, dtime=None,
dynamic='', lines='AUTO', threads=3, tid=122, tags=None, cover_path=None, description='',
dolby=0, hires=0, no_reprint=0, open_elec=0,credits=[]
dolby=0, hires=0, no_reprint=0, open_elec=0, credits=[],
user_cookie='cookies.json'
):
super().__init__(principal, data, persistence_path='bili.cookie', postprocessor=postprocessor)
@@ -118,4 +118,4 @@ class BiliWeb(UploadBase):
"type": 1
})
desc_v2[0]["raw_text"] = desc_v2[0]["raw_text"][1:] # 开头空格会导致识别简介过长
return desc_v2
return desc_v2
+4 -1
View File
@@ -33,7 +33,10 @@ def upload(data):
threshold = config.get('filtering_threshold', 0)
if threshold:
data['threshold'] = threshold
data['dolby'] = config.get('dolby', 0)
data['hires'] = config.get('hires', 0)
data['no_reprint'] = config.get('no_reprint', 0)
data['open_elec'] = config.get('open_elec', 0)
sig = inspect.signature(cls)
kwargs = {}
for k in sig.parameters: