diff --git a/searx/webapp.py b/searx/webapp.py index 25a4b0b63..95653fe00 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1181,7 +1181,867 @@ const search_type = "''' + search_type + r'''" const net_search = ''' + net_search_str + r''' ''' diff --git a/searx/webapp1.py b/searx/webapp1.py index 802376dce..95653fe00 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -1230,10 +1230,14 @@ function modal_open(url, num) var iframe = document.querySelector("#iframe-wrapper > iframe"); let modalele = eleparse(iframe.contentDocument); let article = new Readability(iframe.contentDocument.cloneNode(true)).parse(); + let fulltext = article.textContent; + fulltext.replaceAll("\n\n","\n").replaceAll("\n\n","\n"); + const delimiter = /[?!;\?\n。;!………]/g + fulltext = fulltext.split(delimiter); optkeytext = { method: "POST", headers: headers, - body: JSON.stringify({'text':article.textContent}) + body: JSON.stringify({'text':fulltext.join("\n")}) }; fetchRetry('https://search.kg/keytext',3,optkeytext) .then(response => response.json())