|
|
@ -138,6 +138,7 @@ class DouBaoSpider(AbstractAiSeoSpider): |
|
|
if '/samantha/chat/completion' in response.url: |
|
|
if '/samantha/chat/completion' in response.url: |
|
|
answer = '' |
|
|
answer = '' |
|
|
datas = [] |
|
|
datas = [] |
|
|
|
|
|
index_data = list() |
|
|
response_text = ftfy.fix_text(await response.text()) |
|
|
response_text = ftfy.fix_text(await response.text()) |
|
|
lines = response_text.split("\n\n") |
|
|
lines = response_text.split("\n\n") |
|
|
for line in lines: |
|
|
for line in lines: |
|
|
@ -154,6 +155,7 @@ class DouBaoSpider(AbstractAiSeoSpider): |
|
|
except JSONDecodeError: |
|
|
except JSONDecodeError: |
|
|
continue |
|
|
continue |
|
|
logger.debug(f"ai回复: {answer}") |
|
|
logger.debug(f"ai回复: {answer}") |
|
|
|
|
|
self.index_data = list(set(index_data)) |
|
|
self.ai_answer.answer = answer |
|
|
self.ai_answer.answer = answer |
|
|
self.completed_event.set() |
|
|
self.completed_event.set() |
|
|
|
|
|
|
|
|
|