fix wikipedia extract sometimes showing '( ;'

This commit is contained in:
mat 2024-01-03 01:51:37 -06:00
parent 1b33fbc3fa
commit 0f83e6122e

View File

@ -74,7 +74,10 @@ pub fn parse_response(body: &str) -> eyre::Result<EngineResponse> {
return Ok(EngineResponse::new()); return Ok(EngineResponse::new());
} }
let extract = extract.replace("( )", "").replace("()", ""); let extract = extract
.replace("( ;", "(")
.replace("( )", "")
.replace("()", "");
let page_title = title.replace(' ', "_"); let page_title = title.replace(' ', "_");
let page_url = format!("https://en.wikipedia.org/wiki/{page_title}"); let page_url = format!("https://en.wikipedia.org/wiki/{page_title}");