Documentation ¶
Index ¶
- func GetWebsiteDescription(url string) (string, error)
- func GetWebsiteImg(url string) (string, error)
- func GetWebsiteLocale(url string) (string, error)
- func GetWebsiteLogo(url string) (string, error)
- func GetWebsiteName(rawurl string) (string, error)
- func GetWebsitePageTitle(url string) (string, error)
- func GetWebsiteType(url string) (string, error)
- func GetWebsiteVideo(url string) (string, error)
- type GenericDetails
- type MusicDetails
- type OpenGraphResponse
- type VideoDetails
- type Website
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetWebsiteDescription ¶
Get the website page description by a url string provided accesing the og:description of website url, will return either the description or empty string if it cannot find.
func GetWebsiteImg ¶
Get the website page image by a url string provided accesing the og:image of website url, will return either the image or empty string if it cannot find.
func GetWebsiteLocale ¶
Get the website locale by a url string provided accesing the og:locale of website url, will return either the locale or empty string if it cannot find.
func GetWebsiteLogo ¶
Get the website logo by a url string provided, will return either the logo or empty string if it cannot find; check the full websites json if logos in: https://github.com/pedrosouza458/go-open-graph-scraper/blob/main/utils/websites.json.
func GetWebsiteName ¶
Get the website name by a url string provided, will return either the name or empty string if it cannot find.
func GetWebsitePageTitle ¶
Get the website title by a url string provided accesing the og:title of website url, will return either the title or empty string if it cannot find.
func GetWebsiteType ¶
Get the website page type object by a url string provided accesing the og:type of website url, will return either the type object or empty string if it cannot find.
func GetWebsiteVideo ¶
Get the website video by a url string provided accesing the og:video of website url, will return either the video url or empty string if it cannot find.
Types ¶
type MusicDetails ¶
type MusicDetails struct { Duration int `json:"duration,omitempty"` Album string `json:"album,omitempty"` Musician []string `json:"musician,omitempty"` ReleaseDate string `json:"release_date,omitempty"` }
Music type details
type OpenGraphResponse ¶
type OpenGraphResponse struct { Type string `json:"type"` Details interface{} `json:"details,omitempty"` }
Base struct for the JSON response
type VideoDetails ¶
type VideoDetails struct { Duration int `json:"duration,omitempty"` ReleaseDate string `json:"release_date,omitempty"` Actor []string `json:"actor,omitempty"` Director []string `json:"director,omitempty"` Writer []string `json:"writer,omitempty"` Tag []string `json:"tag,omitempty"` }
Video type details