fix get_content() on an URL (instead of integer ID)
This commit is contained in:
parent
710d8ffd54
commit
430291a7e2
2 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue