From 8deb9da047b792f0f15fb717148e2abb4fc99212 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 3 Jul 2010 14:19:09 +0200 Subject: [PATCH] ability to see all messages of a thread --- weboob/backends/aum/browser.py | 2 +- weboob/backends/aum/pages/base.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/weboob/backends/aum/browser.py b/weboob/backends/aum/browser.py index 55ea45fc..ee5bd581 100644 --- a/weboob/backends/aum/browser.py +++ b/weboob/backends/aum/browser.py @@ -65,7 +65,7 @@ class AdopteUnMec(BaseBrowser): 'http://www.adopteunmec.com/shop2c.php': ShopPage, 'http://www.adopteunmec.com/mails.php': ContactListPage, 'http://www.adopteunmec.com/mails.php\?type=1': BasketsPage, - 'http://www.adopteunmec.com/thread.php\?id=([0-9]+)': ContactThreadPage, + 'http://www.adopteunmec.com/thread.php\?id=([0-9]+)(&see=all)?': ContactThreadPage, 'http://www.adopteunmec.com/edit.php\?type=1': EditPhotoPage, 'http://s\d+.adopteunmec.com/upload\d.php\?.*': EditPhotoCbPage, 'http://www.adopteunmec.com/edit.php\?type=2': EditAnnouncePage, diff --git a/weboob/backends/aum/pages/base.py b/weboob/backends/aum/pages/base.py index f4a25ee7..d3a4e69e 100644 --- a/weboob/backends/aum/pages/base.py +++ b/weboob/backends/aum/pages/base.py @@ -33,8 +33,11 @@ class PageBase(BasePage): def open_contact_list_page(self): self.browser.follow_link(url_regex=r"/mails.php$") - def open_thread_page(self, id): - self.browser.location('/thread.php?id=%d' % int(id)) + def open_thread_page(self, id, all_messages=False): + if all_messages: + self.browser.location('/thread.php?id=%d&see=all' % int(id)) + else: + self.browser.location('/thread.php?id=%d' % int(id)) def score(self): """