Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OembedRedirectGoodError ¶
type OembedRedirectGoodError struct {
// contains filtered or unexported fields
}
OembedRedirectGoodError is a hack to stop following redirects and get oembed resource
func (*OembedRedirectGoodError) Error ¶
func (orge *OembedRedirectGoodError) Error() string
func (*OembedRedirectGoodError) GetItem ¶
func (orge *OembedRedirectGoodError) GetItem() *oembed.Item
GetItem return embed item
func (*OembedRedirectGoodError) GetURL ¶
func (orge *OembedRedirectGoodError) GetURL() string
GetURL returns url of resource with embeding implemented
type Parser ¶
type Parser struct { AcceptLanguage string UserAgent string MaxHTMLBodySize int64 MaxBinaryBodySize int64 WaitTimeout time.Duration // list of IP addresses to blacklist BlacklistedIPNetworks []*net.IPNet // list of IP addresses to whitelist WhitelistedIPNetworks []*net.IPNet // contains filtered or unexported fields }
Parser implements an url parsing code
func NewParser ¶
NewParser returns new Parser instance Oembed pointer is optional, it just speeds up information gathering
func (*Parser) FetchOembedFromHTML ¶
FetchOembedFromHTML returns information extracted from html page
Click to show internal directories.
Click to hide internal directories.