def extractDict(status): # status: tweepy.models.Status #---------------------------------------- userdict = dict({'id':status.user.id, 'screen_name':status.user.screen_name, 'friends_count':status.user.friends_count, 'rt_time':cfg.dt_to_epoch(status.created_at)}) return userdict
def dumpJSONDict(status): # status: tweepy.models.Status #---------------------------------------- userdict = dict({'id':status.user.id, 'screen_name':status.user.screen_name, 'followers_count':status.user.followers_count, 'rt_time':cfg.dt_to_epoch(status.created_at)}) return json.dumps(userdict, ensure_ascii=True)