Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 30 lines (24 sloc) 664 Bytes
import json
import tweepy
import sys
import pprint
import os
import ConfigParser
import time
tweetid = sys.argv[1]
config = ConfigParser.ConfigParser()
config.read('twitter.ini')
consumer_key = config.get('Twitter', 'consumer_key')
consumer_secret = config.get('Twitter', 'consumer_secret')
access_key = config.get('Twitter', 'access_key')
access_secret = config.get('Twitter', 'access_secret')
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api = tweepy.API(auth)
try:
tweets = api._statuses_lookup(id=tweetid)
for tweet in tweets:
print json.dumps(tweet.json)
print tweet
except:
sys.exit()