0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-12-22 12:28:21 -05:00

🚑️ fix(engine): fix the pagination code for searx engine (#468)

This commit is contained in:
neon_arch 2023-12-30 13:06:57 +03:00
parent 2bdddaf928
commit 72da32383e

View File

@ -50,14 +50,10 @@ impl SearchEngine for Searx {
safe_search = 2;
};
let url: String = match page {
0 | 1 => {
format!("https://searx.be/search?q={query}&pageno=1&safesearch={safe_search}")
}
_ => {
format!("https://searx.be/search?q={query}&pageno={page}&safesearch={safe_search}")
}
};
let url: String = format!(
"https://searx.be/search?q={query}&pageno={}&safesearch={safe_search}",
page + 1
);
// initializing headers and adding appropriate headers.
let header_map = HeaderMap::try_from(&HashMap::from([