diff --git a/pkg/internal/models/link.go b/pkg/internal/models/link.go index 70de75d..08a7965 100644 --- a/pkg/internal/models/link.go +++ b/pkg/internal/models/link.go @@ -6,8 +6,11 @@ type LinkMeta struct { Entry string `json:"entry_id" gorm:"uniqueIndex"` Icon string `json:"icon"` URL string `json:"url"` - Image *string `json:"image"` Title *string `json:"title"` + Image *string `json:"image"` Video *string `json:"video"` + Audio *string `json:"audio"` Description *string `json:"description"` + SiteName *string `json:"site_name"` + Type *string `json:"type"` } diff --git a/pkg/internal/services/link_expander.go b/pkg/internal/services/link_expander.go index 39ec9be..c10be1b 100644 --- a/pkg/internal/services/link_expander.go +++ b/pkg/internal/services/link_expander.go @@ -77,6 +77,12 @@ func LinkExpand(target string) (*models.LinkMeta, error) { meta.Image = lo.ToPtr(e.Attr("content")) case "og:video": meta.Video = lo.ToPtr(e.Attr("content")) + case "og:audio": + meta.Audio = lo.ToPtr(e.Attr("content")) + case "og:site_name": + meta.SiteName = lo.ToPtr(e.Attr("content")) + case "og:type": + meta.Type = lo.ToPtr(e.Attr("content")) } }) c.OnHTML("link[rel]", func(e *colly.HTMLElement) {