trim harder

closes #44
This commit is contained in:
Cat /dev/Nulo 2024-08-04 17:31:00 -03:00
parent 8617a0b2a5
commit 905d94a55e

View file

@ -56,7 +56,11 @@ pub fn parse(url: String, dom: &tl::VDom) -> Result<PrecioPoint, anyhow::Error>
.find_map(|n| n.as_tag())
.map(|t| t.inner_text(dom.parser()))
// https://github.com/catdevnull/preciazo/issues/24
.map(|s| html_escape::decode_html_entities(s.trim()).to_string());
.map(|s| {
html_escape::decode_html_entities(s.trim())
.trim()
.to_string()
});
let image_url = dom
.query_selector(".zoomImage1")