This commit is contained in:
parent
4bcc3755d7
commit
c5c8bd823e
1 changed files with 14 additions and 0 deletions
14
src/rss.nim
14
src/rss.nim
|
|
@ -50,6 +50,20 @@ proc mixRssFeeds*(
|
|||
case feed.kind
|
||||
of Atom:
|
||||
entries.add parseAtom(fetched)
|
||||
|
||||
entries[^1].items = entries[^1].items.mapIt(
|
||||
block:
|
||||
var item = it
|
||||
if feed.timeFormat.len != 0 and item.pubDate.isSome():
|
||||
# if the IDE screams at you here, ignore it
|
||||
item.pubdate =
|
||||
some(parse(item.pubDate.get(), feed.timeFormat).format(atomTimeFormat))
|
||||
if item.updated.isSome():
|
||||
item.updated =
|
||||
some(parse(item.updated.get(), feed.timeFormat).format(atomTimeFormat))
|
||||
|
||||
item
|
||||
)
|
||||
of RSSv2:
|
||||
entries.add parseRss(fetched)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue