Trim text.
This commit is contained in:
parent
691a9b86c8
commit
457d8329ee
|
@ -21,7 +21,8 @@ pub fn select_first_element_text(
|
||||||
parent
|
parent
|
||||||
.select(selector)
|
.select(selector)
|
||||||
.next()
|
.next()
|
||||||
.map(|element| element.text().collect())
|
.map(|element| element.text().collect::<String>())
|
||||||
|
.map(|text| text.trim().to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shorthand for creating a [`scraper::Selector`].
|
/// Shorthand for creating a [`scraper::Selector`].
|
||||||
|
|
Loading…
Reference in New Issue