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