Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTMLInfo ¶
type HTMLInfo struct { // http.Client instance to use, if nil then will be used default client Client *http.Client `json:"-"` // If it's true then parser will fetch oembed data from oembed url if possible AllowOembedFetching bool `json:"-"` // If is' true parser will extract main page content from html AllowMainContentExtraction bool `json:"-"` Title string `json:"title"` Description string `json:"description"` CanonicalURL string `json:"canonical_url"` OembedJSONURL string `json:"oembed_json_url"` OembedXMLURL string `json:"oembed_xml_url"` FaviconURL string `json:"favicon_url"` ImageSrcURL string `json:"image_src_url"` // Readability package is being used inside MainContent string `json:"main_content"` OGInfo *opengraph.OpenGraph `json:"opengraph"` OembedInfo *oembed.Info `json:"oembed"` // contains filtered or unexported fields }
HTMLInfo contains information extracted from HTML page
func (*HTMLInfo) GenerateOembedFor ¶
GenerateOembedFor return Oembed Info for given url based on previously parsed data The returned oembed data is also updated in info.OembedInfo Example:
info := NewHTMLInfo() info.Parse(dataReader, &sourceURL) oembed := info.GenerateOembedFor(sourceURL)
Click to show internal directories.
Click to hide internal directories.