translate: json cleanup improvement
This commit is contained in:
@@ -34,6 +34,7 @@ def translate(text, input='auto', output='en'):
|
||||
|
||||
while ',,' in result:
|
||||
result = result.replace(',,', ',null,')
|
||||
result = result.replace('[,', '[null,')
|
||||
data = json.loads(result)
|
||||
|
||||
if raw:
|
||||
|
||||
Reference in New Issue
Block a user