mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
Update gemini.py
This commit is contained in:
parent
e8823fa2b3
commit
07a480c7b8
@ -1,4 +1,5 @@
|
||||
from translator.basetranslator import basetrans
|
||||
import json
|
||||
|
||||
|
||||
class TS(basetrans):
|
||||
@ -112,8 +113,7 @@ class TS(basetrans):
|
||||
__x = __x.strip()
|
||||
if not __x.startswith('"text":'):
|
||||
continue
|
||||
__x = __x[7:]
|
||||
__x = eval(__x)
|
||||
__x = json.loads("{" + __x + "}")["text"]
|
||||
yield __x
|
||||
line += __x
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user