scrape v2.0.0 Scrape.Filter
These functions transform a given list of string results into specific subsets. Very useful to normalize results from Floki.
Summary
Functions
Return a list of all unique strings
Returns the first element of the list
Finds the longest string within an list of strings. If only a string is passed instead of a list, the given string is returned as-is. If nothing can be found, nil is returned
Functions
Return a list of all unique strings.
## Example
iex> Scrape.Filter.all ["ab", "abc", "abc"]
["ab", "abc"]
Returns the first element of the list.
## Example
iex> Scrape.Filter.first ["ab", "abc", "a"]
"ab"