CODE:
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Created on 2014-7-8
@author: guaguastd
@name: extractWeiboEntities.py
'''
if __name__ == '__main__':
import json
# get weibo_api to access sina api
from sinaWeiboLogin import sinaWeiboLogin
sinaWeiboApi = sinaWeiboLogin()
# import sinaWeibo
from sinaWeibo import extractWeiboEntities
# import sinaWeoboStatuses
from sinaWeiboStatuses import publicTimeline
# get the new 200 weibo
statuses = publicTimeline(sinaWeiboApi, 200)
status_texts,screen_names,words = extractWeiboEntities(statuses)
# Explore the first 5 items for each...
print json.dumps(status_texts[0:5], indent=1)
print json.dumps(screen_names[0:5], indent=1)
print json.dumps(words[0:5], indent=1)
RESULT:
<