Update gemini.py

This commit is contained in:
恍兮惚兮 2024-08-13 01:40:42 +08:00
parent e8823fa2b3
commit 07a480c7b8

View File

@ -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