🚑️ fix(engine): fix the pagination code for searx
engine (#468)
This commit is contained in:
parent
2bdddaf928
commit
72da32383e
1 changed files with 4 additions and 8 deletions
|
@ -50,14 +50,10 @@ impl SearchEngine for Searx {
|
||||||
safe_search = 2;
|
safe_search = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
let url: String = match page {
|
let url: String = format!(
|
||||||
0 | 1 => {
|
"https://searx.be/search?q={query}&pageno={}&safesearch={safe_search}",
|
||||||
format!("https://searx.be/search?q={query}&pageno=1&safesearch={safe_search}")
|
page + 1
|
||||||
}
|
);
|
||||||
_ => {
|
|
||||||
format!("https://searx.be/search?q={query}&pageno={page}&safesearch={safe_search}")
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// initializing headers and adding appropriate headers.
|
// initializing headers and adding appropriate headers.
|
||||||
let header_map = HeaderMap::try_from(&HashMap::from([
|
let header_map = HeaderMap::try_from(&HashMap::from([
|
||||||
|
|
Loading…
Add table
Reference in a new issue