我是Python和JSON的新手。我安裝了twython以「發言」Twitter API。我在Mac上使用Python 2.7。JSON或SimpleJSON和Python與Twython
我想通過API獲得我的提及。該計劃應確定提到我的Twitter用戶。
我嘗試:
t = Twython(...)
men = t.get_mentions_timeline()
的用戶曾經提到,打印男人這樣表示了很多東西:
[{u'contributors': None, u'truncated': False, u'text': .... u'Sun May 26 09:18:55 +0000 2013', u'in_reply_to_status_id_str': None, u'place': None}]
某處在這個東西,我看到的一切我都喜歡的東西來從響應中提取。
如何提取screen_name
?
我很困惑json.dumps
或json.loads
- 我應該與json
或simplejson
?
我已經得到了解決 - 只有一個: 用於提男性: \t畝=提[「用戶」] \t \t tweetid =提[ '身份證'] \t用戶N =畝[ 'SCREEN_NAME'] \t打印tweetid \t打印用戶N – hildwin