From a2108a56edfc0daeb4ebefee4403fd4c32d8db20 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Wed, 13 Oct 2010 17:55:03 +0200 Subject: [PATCH] report fakes --- weboob/backends/aum/backend.py | 3 +++ weboob/backends/aum/browser.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/weboob/backends/aum/backend.py b/weboob/backends/aum/backend.py index 03aedef8..1445ffe3 100644 --- a/weboob/backends/aum/backend.py +++ b/weboob/backends/aum/backend.py @@ -108,6 +108,7 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh continue if self.antispam and not self.antispam.check(contact): debug('Skipped a spam-thread from %s' % contact.get_name()) + self.browser.report_fake(contact.get_id()) continue thread = Thread(contact.get_id()) thread.title = 'Discussion with %s' % contact.get_name() @@ -196,6 +197,7 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh continue if self.antispam and not self.antispam.check(contact): debug('Skipped a spam-unread-thread from %s' % contact.get_name()) + self.browser.report_fake(contact.get_id()) continue slut = self._get_slut(contact.get_id()) if contact.get_lastmsg_date() > slut['lastmsg']: @@ -216,6 +218,7 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh profile = self.browser.get_profile(ids[new_baskets]) if self.antispam and not self.antispam.check(profile): debug('Skipped a spam-basket from %s' % profile.get_name()) + self.browser.report_fake(profile.get_id()) continue thread = Thread(profile.get_id()) diff --git a/weboob/backends/aum/browser.py b/weboob/backends/aum/browser.py index 8b486c42..896a0391 100644 --- a/weboob/backends/aum/browser.py +++ b/weboob/backends/aum/browser.py @@ -227,6 +227,9 @@ class AuMBrowser(BaseBrowser): warning('Deblock: %s' % result) return True + def report_fake(self, id): + return self.readurl('http://www.adopteunmec.com/fake.php', 'id=%s' % id) + @pageaccess def rate(self, id, what, rating): print 'rate "%s"' % id, what, rating