Spaces:
Runtime error
Runtime error
neon_arch
commited on
Commit
β’
2bdddaf
1
Parent(s):
0dd25aa
ποΈ fix(engine): fix the pagination code for `librex` engine (#468)
Browse files- src/engines/librex.rs +4 -11
src/engines/librex.rs
CHANGED
@@ -65,17 +65,10 @@ impl SearchEngine for LibreX {
|
|
65 |
) -> Result<HashMap<String, SearchResult>, EngineError> {
|
66 |
// Page number can be missing or empty string and so appropriate handling is required
|
67 |
// so that upstream server recieves valid page number.
|
68 |
-
let url: String =
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
_ => {
|
73 |
-
format!(
|
74 |
-
"https://search.ahwx.org/search.php?q={query}&p={}&t=10",
|
75 |
-
page * 10,
|
76 |
-
)
|
77 |
-
}
|
78 |
-
};
|
79 |
|
80 |
// initializing HeaderMap and adding appropriate headers.
|
81 |
let header_map = HeaderMap::try_from(&HashMap::from([
|
|
|
65 |
) -> Result<HashMap<String, SearchResult>, EngineError> {
|
66 |
// Page number can be missing or empty string and so appropriate handling is required
|
67 |
// so that upstream server recieves valid page number.
|
68 |
+
let url: String = format!(
|
69 |
+
"https://search.ahwx.org/search.php?q={query}&p={}&t=10",
|
70 |
+
page * 10
|
71 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
// initializing HeaderMap and adding appropriate headers.
|
74 |
let header_map = HeaderMap::try_from(&HashMap::from([
|