Crawler.Parser.Spec behaviour (Crawler v1.1.2) View Source

Spec for defining a parser.

Link to this section Summary

Link to this section Types

Specs

body() :: String.t()

Specs

opts() :: map()

Specs

page() :: %Crawler.Store.Page{
  body: body(),
  opts: opts(),
  processed: term(),
  url: url()
}

Specs

url() :: String.t()

Link to this section Callbacks

Specs

parse(page()) :: {:ok, page()}
parse({:error, term()}) :: :ok