This commit is contained in:
Nazar Kanaev
2021-03-26 13:28:29 +00:00
parent 5335863488
commit 51cbdea31f
4 changed files with 37 additions and 28 deletions

View File

@@ -71,13 +71,13 @@ func ParseAtom(r io.Reader) (*Feed, error) {
}
for _, srcitem := range srcfeed.Entries {
dstfeed.Items = append(dstfeed.Items, Item{
GUID: firstNonEmpty(srcitem.ID),
Date: dateParse(firstNonEmpty(srcitem.Published, srcitem.Updated)),
URL: firstNonEmpty(srcitem.Links.First("alternate"), srcfeed.Links.First("")),
Title: srcitem.Title.String(),
Content: firstNonEmpty(srcitem.Content.String(), srcitem.firstMediaDescription()),
ImageURL: srcitem.firstMediaThumbnail(),
PodcastURL: "",
GUID: firstNonEmpty(srcitem.ID),
Date: dateParse(firstNonEmpty(srcitem.Published, srcitem.Updated)),
URL: firstNonEmpty(srcitem.Links.First("alternate"), srcfeed.Links.First("")),
Title: srcitem.Title.String(),
Content: firstNonEmpty(srcitem.Content.String(), srcitem.firstMediaDescription()),
ImageURL: srcitem.firstMediaThumbnail(),
AudioURL: "",
})
}
return dstfeed, nil