View Source HipcallWhichtech (HipcallWhichtech v0.5.0)

Documentation for HipcallWhichtech.

Summary

Functions

Detect a website tech

Request and get html body from an URL.

Types

url()

@type url() :: String.t() | URI.t()

Functions

detect(html_body, options \\ [])

@spec detect(html_body :: String.t(), options :: Keyword.t()) ::
  {:ok, list()} | {:error, any()}

Detect a website tech

Examples

iex> {:ok, html_body} = HipcallWhichtech.request("https://www.bulutfon.com/")
iex> HipcallWhichtech.detect(html_body)
...> {:ok, [:wordpress]}

iex> {:ok, html_body} = HipcallWhichtech.request("https://woo.com/")
iex> HipcallWhichtech.detect(html_body)
...> {:ok, [:wordpress, :woocommerce]}

You can set the excluded detectors. For example exclude: [:woocommerce] options.

iex> {:ok, html_body} = HipcallWhichtech.request("https://woo.com/")
iex> HipcallWhichtech.detect(html_body, exclude: [:woocommerce])
...> {:ok, [:wordpress]}

You can also set one or more detectors. For example only: [:wordpress] options. Package check only wordpress with this option.

iex> {:ok, html_body} = HipcallWhichtech.request("https://woo.com/")
iex> HipcallWhichtech.detect(html_body, only: [:wordpress])
...> {:ok, [:wordpress]}

Arguments

  • html_body : html code
  • options : list

Options

  • :exclude (list of atom/0) - A list of detector which are exclude The default value is [].

  • :only (list of atom/0) - Detector that only look The default value is [].

Raises

Returns

  • {:ok, list()}
  • {:error, any()}

request(url)

@spec request(url()) :: {:ok, String.t()} | {:error, any()}

Request and get html body from an URL.

Examples

iex> {:ok, html_body} = request("https://woo.com/")

Arguments

  • url: String

Options

  • There is no option.

Raises

  • There is no exception.

Returns

  • {:ok, binary()}
  • {:error, any()}