mirror of
https://github.com/Yanyutin753/RefreshToV1Api.git
synced 2025-12-11 02:01:26 +08:00
fix 漏字情况
This commit is contained in:
9
main.py
9
main.py
@@ -1443,10 +1443,11 @@ def data_fetcher(upstream_response, data_queue, stop_event, last_data_time, api_
|
|||||||
else:
|
else:
|
||||||
# 只获取新的 parts
|
# 只获取新的 parts
|
||||||
parts = content.get("parts", [])
|
parts = content.get("parts", [])
|
||||||
full_text = ''.join(parts)
|
full_text = ''.join(parts)
|
||||||
new_text = full_text[len(last_full_text):]
|
if full_text == "![":
|
||||||
if full_text != '':
|
last_full_text = "!"
|
||||||
last_full_text = full_text # 更新完整文本以备下次比较
|
new_text = full_text[len(last_full_text):]
|
||||||
|
last_full_text = full_text
|
||||||
if "\u3010" in new_text and not citation_accumulating:
|
if "\u3010" in new_text and not citation_accumulating:
|
||||||
citation_accumulating = True
|
citation_accumulating = True
|
||||||
citation_buffer = citation_buffer + new_text
|
citation_buffer = citation_buffer + new_text
|
||||||
|
|||||||
Reference in New Issue
Block a user