Update client.py

This commit is contained in:
wannaphongcom
2015-10-16 13:10:35 +07:00
parent ace4c19a9e
commit dfe2108792

View File

@@ -65,7 +65,7 @@ class Client(object):
self.threads = []
self.threads = []
#self.data = data
def _console(self, msg):
if self.debug: print(msg)
@@ -150,12 +150,12 @@ class Client(object):
r = self._get("https://www.facebook.com/ajax/typeahead/search.php", payload)
self.j = j = get_json(r.text)
self.r = r
users = []
for entry in j['payload']['entries']:
if entry['type'] == 'user':
users.append(User(entry))
return users
return users # have bug TypeError: __repr__ returned non-string (type bytes)
def sendMessage(self, message, thread_id):
timestamp = now()