Crawler v1.1.0 Crawler.Parser.Spec behaviour

Spec for defining a parser.

Link to this section Summary

Link to this section Types

Link to this type

body()
body() :: String.t()

Link to this type

opts()
opts() :: map()

Link to this type

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

Link to this type

url()
url() :: String.t()

Link to this section Callbacks

Link to this callback

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

Link to this callback

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