2 Commits
v0.3 ... v0.4

Author SHA1 Message Date
bel
9c4c0da004 Get enclosures in body
Former-commit-id: 54036d076a334394bc6e7b1f2071ce92bef96325
2019-06-26 18:00:58 -06:00
bel
e388723199 gitignore executable
Former-commit-id: 69dde9cfe2ed99ca2eefd25b96cb1328e622a6e2
2019-06-26 17:50:19 -06:00
2 changed files with 5 additions and 0 deletions

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ exec-rssmon3
**.sw* **.sw*
**/testdata **/testdata
**/._* **/._*
**/exec-*
exec-*

View File

@@ -47,6 +47,9 @@ func newItem(i *gofeed.Item, contentFilter string) (*Item, error) {
} }
item.Content = string(b) 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 { if unescaped, err := url.QueryUnescape(item.Content); err == nil {
item.Content = unescaped item.Content = unescaped
} }