neon_arch commited on
Commit
72da323
β€’
1 Parent(s): 2bdddaf

πŸš‘οΈ fix(engine): fix the pagination code for `searx` engine (#468)

Browse files
Files changed (1) hide show
  1. src/engines/searx.rs +4 -8
src/engines/searx.rs CHANGED
@@ -50,14 +50,10 @@ impl SearchEngine for Searx {
50
  safe_search = 2;
51
  };
52
 
53
- let url: String = match page {
54
- 0 | 1 => {
55
- format!("https://searx.be/search?q={query}&pageno=1&safesearch={safe_search}")
56
- }
57
- _ => {
58
- format!("https://searx.be/search?q={query}&pageno={page}&safesearch={safe_search}")
59
- }
60
- };
61
 
62
  // initializing headers and adding appropriate headers.
63
  let header_map = HeaderMap::try_from(&HashMap::from([
 
50
  safe_search = 2;
51
  };
52
 
53
+ let url: String = format!(
54
+ "https://searx.be/search?q={query}&pageno={}&safesearch={safe_search}",
55
+ page + 1
56
+ );
 
 
 
 
57
 
58
  // initializing headers and adding appropriate headers.
59
  let header_map = HeaderMap::try_from(&HashMap::from([