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