open_graph_extended v0.1.1 OpenGraphExtended

Fetch and parse websites to extract Open Graph meta tags.

The example above shows how to fetch the GitHub Open Graph rich objects.

OpenGraphExtended.fetch("https://github.com")
%OpenGraphExtended{description: "GitHub is where people build software. More than 15 million...",
image: "https://assets-cdn.github.com/images/modules/open_graph/github-octocat.png",
site_name: "GitHub", title: "Build software better, together", type: nil,
url: "https://github.com"}

Link to this section Summary

Functions

Parses the given HTML to extract the Open Graph objects

Link to this section Types

Link to this type html()
html() :: String.t() | charlist()
Link to this type t()
t() :: %OpenGraphExtended{
  audio: String.t(),
  "audio:secure_url": String.t(),
  "audio:type": String.t(),
  description: String.t(),
  determiner: String.t(),
  image: term(),
  "image:alt": String.t(),
  "image:height": String.t(),
  "image:secure_url": String.t(),
  "image:type": String.t(),
  "image:width": String.t(),
  locale: String.t(),
  site_name: String.t(),
  title: String.t(),
  type: String.t(),
  url: String.t(),
  video: String.t(),
  "video:alt": String.t(),
  "video:height": String.t(),
  "video:secure_url": String.t(),
  "video:type": String.t(),
  "video:width": String.t()
}

Link to this section Functions

Link to this function parse(html)
parse(String.t()) :: t()

Parses the given HTML to extract the Open Graph objects.

Args:

  • html - raw HTML as a binary string or char list

This functions returns an OpenGraph struct.