[weboob] [PATCH 2/3] [dlfp] populate url attribute

Simon Lipp laiquo at hwold.net
Sun Feb 7 17:22:43 CET 2016


Signed-off-by: Simon Lipp <laiquo at hwold.net>
---
 modules/dlfp/module.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/dlfp/module.py b/modules/dlfp/module.py
index 2319f14..adaedfd 100644
--- a/modules/dlfp/module.py
+++ b/modules/dlfp/module.py
@@ -89,7 +89,7 @@ class DLFPModule(Module, CapMessages, CapMessagesPost, CapContent):
             for article in Newsfeed(what, rssid).iter_entries():
                 if article.datetime and (datetime.now() - article.datetime) > timedelta(days=60):
                     continue
-                thread = Thread(article.id)
+                thread = Thread(article.id, article.link)
                 thread.title = article.title
                 thread._rsscomment = article.rsscomment
                 if article.datetime:
@@ -126,6 +126,7 @@ class DLFPModule(Module, CapMessages, CapMessagesPost, CapContent):
 
         thread.root = Message(thread=thread,
                               id='0',  # root message
+                              url=self.browser.absurl(id2url(content.id)),
                               title=content.title,
                               sender=content.author or u'',
                               receivers=None,
@@ -153,6 +154,7 @@ class DLFPModule(Module, CapMessages, CapMessagesPost, CapContent):
             com.parse()
             message = Message(thread=parent.thread,
                               id=com.id,
+                              url=com.url,
                               title=com.title,
                               sender=com.author or u'',
                               receivers=None,
-- 
2.7.0



More information about the weboob mailing list