Crawler v0.3.0 Crawler.Parser.LinkParser

Parses links and transforms them if necessary.

Link to this section Summary

Link to this section Functions

Link to this function parse(arg, opts, link_handler)

Examples

iex> LinkParser.parse(
iex>   {"a", [{"hello", "world"}, {"href", "http://hello.world"}], []},
iex>   %{},
iex>   &Kernel.inspect(&1, Enum.into(&2, []))
iex> )
"{\"href\", \"http://hello.world\"}"

iex> LinkParser.parse(
iex>   {"img", [{"hello", "world"}, {"src", "http://hello.world"}], []},
iex>   %{},
iex>   &Kernel.inspect(&1, Enum.into(&2, []))
iex> )
"{\"src\", \"http://hello.world\"}"