From 6d1591bf273100666c485ea5945def2c463f12e4 Mon Sep 17 00:00:00 2001 From: Byaidu <909756245@qq.com> Date: Fri, 6 Dec 2024 21:33:00 +0800 Subject: [PATCH] chore: format --- pdf2zh/translator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pdf2zh/translator.py b/pdf2zh/translator.py index 50e63f15..bcedea36 100644 --- a/pdf2zh/translator.py +++ b/pdf2zh/translator.py @@ -107,7 +107,13 @@ def translate(self, text): ig, iid, key, token = self.fineSID() resp = self.session.post( f"{self.endpoint}?IG={ig}&IID={iid}", - data={"fromLang": self.lang_in, "to": self.lang_out, "text": text, "token": token, "key": key}, + data={ + "fromLang": self.lang_in, + "to": self.lang_out, + "text": text, + "token": token, + "key": key, + }, headers=self.headers, ) return resp.json()[0]["translations"][0]["text"]