UrlFetcher v0.2.0 UrlFetcher View Source

Fetches asset and link URLs from a given page URL.

Link to this section Summary

Functions

Fetch image and link tags URLs.

Link to this section Functions

Specs

fetch(UrlFetcher.Http.Client.url(), [{:key, any()}]) ::
  {:ok, UrlFetcher.SiteData.t()} | {:error, term()}

Fetch image and link tags URLs.

Parameters

  • url: String that represents the URL to parse
  • opts: Keyword list of options

Available options:

  • http_client: HTTP Client to be used. Must comply with UrlFetcher.Http.Client behaviour. Defaults to UrlFetcher.Http.Adapter.Poison.
  • unique: boolean. If set, removes duplicates from results. Defaults to true.
  • normalize: transforms all urls to absolute if set to :absolute, or leaves them as they are with :original. Defaults to original.
  • internal_only: Boolean. If set, filters urls to those internal to the site being fetched. Defaults to false.