From c1d19e40f8b3240dc0c6c6ed3418b30b4242618e Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 7 Nov 2012 17:36:35 +0100 Subject: [PATCH] Get the real thread of an article Side effect: fix the bug of incorrect date by using boobmsg show --- weboob/tools/capabilities/messages/GenericBackend.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/weboob/tools/capabilities/messages/GenericBackend.py b/weboob/tools/capabilities/messages/GenericBackend.py index 2ae28d2f..362879c7 100644 --- a/weboob/tools/capabilities/messages/GenericBackend.py +++ b/weboob/tools/capabilities/messages/GenericBackend.py @@ -40,12 +40,17 @@ class GenericNewspaperBackend(BaseBackend, ICapMessages): URL2ID = None RSSSIZE = 0 + def _get_thread(self, id): + for thread in self.iter_threads(): + if thread.id == id: + return thread + def get_thread(self, _id): if isinstance(_id, Thread): thread = _id id = thread.id else: - thread = None + thread = self._get_thread(_id) id = _id with self.browser: