Skip to content

Commit

Permalink
fix: 百度空白
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhldr committed Sep 6, 2024
1 parent 86e2a3a commit f30b28b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lfy/api/server/baidu.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _translate(session, s, api_key_s, lang_to="auto", lang_from="auto"):
s1 = ""
for trans_result in result["trans_result"]:
s1 += f'{trans_result["dst"]}\n'
return True, s1
return True, s1.strip()

return False, f'{error_msg}\n\n{result["error_code"]}: {result["error_msg"]}'

Expand Down

0 comments on commit f30b28b

Please sign in to comment.