A Golang library to fetch the OGP contents from URl
type OgpPageInfo struct {
Title string `meta:"og:title"`
Url string `meta:"og:url"`
SiteName string `meta:"og:site_name"`
Images []*OgpImage
}
type OgpImage struct {
Url string `meta:"og:image,og:image:url"`
Width int `meta:"og:image:width"`
Height int `meta:"og:image:height"`
}
url := "https://www.bloomberg.co.jp/news/articles/2021-01-19/QN4ILZT0AFBS01"
pageInfo, e := GetPageInfoFromUrl(url)