Iconic v0.1.0 Icon.Parse View Source

Icon parsing module.

Link to this section Summary

Functions

Parse a html string and extract all the icons from it

Link to this section Functions

Parse a html string and extract all the icons from it

Parameters

  • html: String
  • url: a URL string

Returns

  • [Icon.Parse.Icon.t()]
  • [] if no icon discovered

Examples

iex> Icon.Parse.parse(-s(<html><head><link rel="icon" href="a/favicon.ico" /></head></html>), "http://test.com")
[%Icon.Parse.Icon{href: "http://test.com/a/favicon.ico", rel: "icon"}]