mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
d
This commit is contained in:
parent
fe6e7a556a
commit
6d5580e50d
2 changed files with 866 additions and 2 deletions
862
searx/webapp.py
862
searx/webapp.py
File diff suppressed because one or more lines are too long
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue