urlpreview v0.0.3 Urlpreview.Parser

Summary

Functions

Parses the given html body and returns meta data relevant to the html

Functions

parse(map)

Parses the given html body and returns meta data relevant to the html

Examples

iex> Urlpreview.Parser.parse(%{ body: File.read!("fixtures/general_page.html"), url: "https://www.test-site.com" })
{:ok, %{
  real_url: "https://www.test-site.com",
  url: "https://www.test-site.com",
  description: "This is the meta description",
  images: [
    "https://www.test-site.com/itemprop_image.png",
    "https://www.test-site.com/itemprop_image2.png"
  ],
  title: "My Test Site"
}}