mellie
Types
pub type ElementTree =
presentable_soup.ElementTree
Values
pub fn children(
tree: presentable_soup.ElementTree,
) -> List(presentable_soup.ElementTree)
pub fn element(
tag: String,
attributes: List(#(String, String)),
children: List(presentable_soup.ElementTree),
) -> presentable_soup.ElementTree
pub fn element_to_string(
el: presentable_soup.ElementTree,
) -> String
pub fn elements_to_string(
el: List(presentable_soup.ElementTree),
) -> String
pub fn find_all(in: a, f: fn(a) -> List(a)) -> List(a)
Runs the given function recursively over the result until it no longer results in items
pub fn find_leaf(in: a, f: fn(a) -> List(a)) -> List(a)
Runs the given function recursively over the result until it no longer returns items Returns only the deepest matching nodes
pub fn get_child_by_tag(
tree: presentable_soup.ElementTree,
tag: String,
) -> Result(presentable_soup.ElementTree, Nil)
pub fn get_children_by_tag(
tree: presentable_soup.ElementTree,
tag: String,
) -> List(presentable_soup.ElementTree)
Gets children with the given tag up to one level of results. Use with find_all to recurse further into returned elements
pub fn parse(
html str: String,
) -> Result(presentable_soup.ElementTree, String)
pub fn text(text: String) -> presentable_soup.ElementTree
pub fn to_document_string(
el: presentable_soup.ElementTree,
) -> String