Floki.attribute
You're seeing just the function
attribute
, go back to Floki module for more information.
Specs
Returns a list with attribute values from elements.
Examples
iex> Floki.attribute([{"a", [{"href", "https://google.com"}], ["Google"]}], "href")
["https://google.com"]
Specs
Returns a list with attribute values for a given selector.
Examples
iex> Floki.attribute([{"a", [{"href", "https://google.com"}], ["Google"]}], "a", "href")
["https://google.com"]
iex> Floki.attribute([{"a", [{"class", "foo"}, {"href", "https://google.com"}], ["Google"]}], "a", "class")
["foo"]