readability/lib/readability.ex

11 lines
269 B
Elixir
Raw Normal View History

2016-04-15 11:51:29 +00:00
defmodule Readability do
alias Readability.TitleFinder
@type html_tree :: tuple | list
def title(html) when is_binary(html), do: parse(html) |> title
def title(html_tree), do: TitleFinder.title(html_tree)
2016-04-17 06:28:33 +00:00
def parse(raw_html), do: Floki.parse(raw_html)
2016-04-15 11:51:29 +00:00
end