Get enclosures in body

Former-commit-id: 54036d076a334394bc6e7b1f2071ce92bef96325
master v0.4
bel 2019-06-26 18:00:58 -06:00
parent e388723199
commit 9c4c0da004
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ func newItem(i *gofeed.Item, contentFilter string) (*Item, error) {
}
item.Content = string(b)
}
for _, enclosure := range i.Enclosures {
item.Content += fmt.Sprintf(`<br><a href="%s">%s</a>`, enclosure.URL, enclosure.URL)
}
if unescaped, err := url.QueryUnescape(item.Content); err == nil {
item.Content = unescaped
}