예제 #1
0
파일: seed.py 프로젝트: yichijin/retweet
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
예제 #2
0
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)