fix spelling
This commit is contained in:
parent
e2907edf6e
commit
dbe5b533d6
6 changed files with 8 additions and 8 deletions
|
@ -36,7 +36,7 @@ pub async fn results(
|
|||
user_agent: &str,
|
||||
) -> Result<HashMap<String, RawSearchResult>, EngineError> {
|
||||
// Page number can be missing or empty string and so appropriate handling is required
|
||||
// so that upstream server recieves valid page number.
|
||||
// so that upstream server receives valid page number.
|
||||
let url: String = match page {
|
||||
1 => {
|
||||
format!("https://html.duckduckgo.com/html/?q={query}&s=&dc=&v=1&o=json&api=/d.js")
|
||||
|
@ -86,7 +86,7 @@ pub async fn results(
|
|||
let results: String = reqwest::Client::new()
|
||||
.get(url)
|
||||
.timeout(Duration::from_secs(5))
|
||||
.headers(header_map) // add spoofed headers to emulate human behaviour
|
||||
.headers(header_map) // add spoofed headers to emulate human behavior
|
||||
.send()
|
||||
.await
|
||||
.into_report()
|
||||
|
|
|
@ -13,7 +13,7 @@ use std::fmt;
|
|||
/// search engines.
|
||||
/// * `UnexpectedError` - This variant handles all the errors which are unexpected or occur rarely
|
||||
/// and are errors mostly related to failure in initialization of HeaderMap, Selector errors and
|
||||
/// all other errors occuring within the code handling the `upstream search engines`.
|
||||
/// all other errors occurring within the code handling the `upstream search engines`.
|
||||
#[derive(Debug)]
|
||||
pub enum EngineError {
|
||||
EmptyResultSet,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue