mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
sakura
This commit is contained in:
parent
314f34104e
commit
b03d00d30d
@ -192,6 +192,8 @@ class TS(basetrans):
|
||||
if not output.headers["Content-Type"].startswith("text/event-stream"):
|
||||
raise Exception(output.text)
|
||||
for o in output.iter_lines():
|
||||
if o == b"data: [DONE]":
|
||||
break
|
||||
try:
|
||||
res = o.decode("utf-8").strip()[6:] # .replace("data: ", "")
|
||||
# print(res)
|
||||
|
Loading…
x
Reference in New Issue
Block a user