store feed datetime
This commit is contained in:
parent
098d22ba35
commit
d66d496a08
2 changed files with 3 additions and 3 deletions
|
|
@ -32,5 +32,5 @@ class DLFPBackend(Backend, ICapMessages, ICapMessagesReply, ICapUpdatable):
|
|||
def iter_messages(self):
|
||||
articles_list = ArticlesList('newspaper')
|
||||
for article in articles_list.iter_articles():
|
||||
yield Message('threadid', article.id, article.title, article.author, signature='Bite bite bite bite',
|
||||
yield Message('threadid', article.id, article.title, article.author, article.datetime, signature='Bite bite bite bite',
|
||||
content='Content content\nContent content.')
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class Article:
|
|||
RSS = None
|
||||
|
||||
def __init__(self, _id, url, title, author, datetime):
|
||||
self._id = _id
|
||||
self.id = _id
|
||||
self.url = url
|
||||
self.title = title
|
||||
self.author = author
|
||||
|
|
@ -60,5 +60,5 @@ class ArticlesList:
|
|||
warning('Unable to parse ID from link \'%s\'' % item['link'])
|
||||
continue
|
||||
_id = m.group(1)
|
||||
article = klass(_id, item['link'], item['title'], item['author'], item['date_parsed'])
|
||||
article = klass(_id, item['link'], item['title'], item['author'], datetime(*item['date_parsed'][:7]))
|
||||
yield article
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue