Merge pull request #67 from jcnoir/fetch-images

Fetch more feed images
This commit is contained in:
Jim Teeuwen 2015-08-18 11:22:03 +02:00
commit 3d7dc94c57
1 changed files with 3 additions and 0 deletions

3
rss.go
View File

@ -102,6 +102,9 @@ func (this *Feed) readRss2(doc *xmlx.Document) (err error) {
if n = node.SelectNode(ns, "image"); n != nil {
ch.Image.Title = n.S(ns, "title")
ch.Image.Url = n.S(ns, "url")
if ch.Image.Url == "" {
ch.Image.Url = n.As(ns, "href")
}
ch.Image.Link = n.S(ns, "link")
ch.Image.Width = n.I(ns, "width")
ch.Image.Height = n.I(ns, "height")