minor update

This commit is contained in:
Taehoon Kim
2015-04-19 02:52:16 +09:00
parent 05f2613997
commit fc7b7f3e43
4 changed files with 15 additions and 18 deletions

View File

@@ -8,7 +8,7 @@ Facebook Chat (Messenger) for Python
from .client import *
__version__ = '0.0.1'
__version__ = '0.0.2'
__author__ = 'Taehoon Kim'
__email__ = 'carpedm20@gmail.com'
__source__ = 'https://github.com/carpedm20/fbchat/'

View File

@@ -21,12 +21,6 @@ from .utils import *
CHROME = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
SAFARI = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/601.1.10 (KHTML, like Gecko) Version/8.0.5 Safari/601.1.10"
def now():
return int(time())
def get_json(text):
return json.loads(re.sub(r"for.*(.*;.*;.*).*;", '', text.decode("unicode-escape").encode("utf-8")))
class Client(object):
"""A client for the Facebook Chat (Messenger).

View File

@@ -1,3 +1,9 @@
def now():
return int(time())
def get_json(text):
return json.loads(re.sub(r"for.*(.*;.*;.*).*;", '', text.decode("unicode-escape").encode("utf-8")))
def digit_to_char(digit):
if digit < 10:
return str(digit)
@@ -10,3 +16,4 @@ def str_base(number,base):
if d > 0:
return str_base(d, base) + digit_to_char(m)
return digit_to_char(m)