new Engines struct, breaks cookies and frontend

This commit is contained in:
Milim 2024-08-15 12:18:19 +02:00
parent 2ca9990e54
commit e666316995
No known key found for this signature in database
13 changed files with 134 additions and 154 deletions

View file

@ -20,18 +20,19 @@ pub struct Brave {
parser: SearchResultParser,
}
impl Brave {
impl Default for Brave {
/// Creates the Brave parser.
pub fn new() -> Result<Brave, EngineError> {
Ok(Self {
fn default() -> Self {
Self {
parser: SearchResultParser::new(
"#results h4",
"#results [data-pos]",
"a > .url",
"a",
".snippet-description",
)?,
})
)
.expect("somehow you changed the static stings in the binary i guess"),
}
}
}