mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
issues/774
This commit is contained in:
parent
3333f41180
commit
dad14e60eb
@ -54,7 +54,11 @@ class TS(basetrans):
|
||||
],
|
||||
},
|
||||
verify=False,
|
||||
).json()
|
||||
)
|
||||
try:
|
||||
res = res.json()
|
||||
except:
|
||||
raise Exception(res.text)
|
||||
try:
|
||||
line = res["candidates"][0]["content"]["parts"][0]["text"]
|
||||
return line
|
||||
|
Loading…
x
Reference in New Issue
Block a user