diff --git a/weboob/backends/aum/backend.py b/weboob/backends/aum/backend.py index da5bae20..3f6d5c42 100644 --- a/weboob/backends/aum/backend.py +++ b/weboob/backends/aum/backend.py @@ -299,6 +299,10 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh raise TypeError("The parameter 'contact' isn't a contact nor a int/long/str/unicode: %s" % contact) profile = self.browser.get_profile(_id) + if not profile: + return None + + _id = profile.id if profile.is_online(): s = Contact.STATUS_ONLINE diff --git a/weboob/backends/aum/browser.py b/weboob/backends/aum/browser.py index e9395cd2..271a8395 100644 --- a/weboob/backends/aum/browser.py +++ b/weboob/backends/aum/browser.py @@ -260,8 +260,10 @@ class AuMBrowser(BaseBrowser): @pageaccess def get_profile(self, link): - if isinstance(link, basestring) and link.startswith('/'): - link = link[1:] + if isinstance(link, basestring): + link = link.replace('http://www.adopteunmec.com/', '') + if link.startswith('/'): + link = link[1:] self.location('/%s' % link) return self.page