From 64e9276b4a594e0e55385439edc69175db0a1fe4 Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Wed, 1 Mar 2023 13:56:09 +0800 Subject: [PATCH] c --- searx/webapp.py | 9 ++++++++- searx/webapp1.py | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 97f628625..85a3199ce 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1227,7 +1227,14 @@ function modal_open(url) keytextres = data; console.log(keytextres) }) - promptWeb = '网页标题:'+ article.title +'\n'+ '网页布局:'+ modalele.slice(400) +'\n' +'网页内容:' + promptWeb = '网页标题:'+ article.title +'\n' + + for (el in modalele) + { + if((promptWeb + el + '\n').length <400) + promptWeb = promptWeb + el + '\n'; + } + '网页布局:\n'+ modalele.slice(400) +'\n' +'网页内容:\n' keySentencesCount = 0; for (sentence in keytextres) { diff --git a/searx/webapp1.py b/searx/webapp1.py index 97f628625..85a3199ce 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -1227,7 +1227,14 @@ function modal_open(url) keytextres = data; console.log(keytextres) }) - promptWeb = '网页标题:'+ article.title +'\n'+ '网页布局:'+ modalele.slice(400) +'\n' +'网页内容:' + promptWeb = '网页标题:'+ article.title +'\n' + + for (el in modalele) + { + if((promptWeb + el + '\n').length <400) + promptWeb = promptWeb + el + '\n'; + } + '网页布局:\n'+ modalele.slice(400) +'\n' +'网页内容:\n' keySentencesCount = 0; for (sentence in keytextres) {