Skip to content

Commit 5ad6310

Browse files
authored
fix: video_updater
1 parent 223e42a commit 5ad6310

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bilibili_api/video_uploader.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -739,12 +739,11 @@ async def _submit(self, videos: list, cover_url: str = "") -> dict:
739739

740740
try:
741741
params = {"csrf": self.credential.bili_jct}
742-
data = json.dumps(meta)
743742
headers = {"content-type": "application/json"}
744743
resp = (
745744
await Api(**api, credential=self.credential, no_csrf=True)
746745
.update_params(**params)
747-
.update_data(**data)
746+
.update_data(**meta)
748747
.update_headers(**headers)
749748
.result
750749
)
@@ -929,12 +928,11 @@ async def _change_cover(self) -> None:
929928

930929
async def _submit(self):
931930
api = _API["edit"]
932-
datas = self.meta
933-
datas["csrf"] = self.credential.bili_jct
931+
data = self.meta
932+
data["csrf"] = self.credential.bili_jct
934933
self.dispatch(VideoEditorEvents.PRE_SUBMIT.value)
935934
try:
936935
params = ({"csrf": self.credential.bili_jct, "t": int(time.time())},)
937-
data = (json.dumps(datas),)
938936
headers = {
939937
"content-type": "application/json;charset=UTF-8",
940938
"referer": "https://member.bilibili.com",

0 commit comments

Comments
 (0)