This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyStreamListener(tweepy.StreamListener): | |
def __init__(self, api=None): | |
super(MyStreamListener, self).__init__() | |
self.num_tweets = 0 | |
self.file = open("tweets.txt", "w") | |
def on_status(self, status): | |
tweet = status._json | |
self.file.write( json.dumps(tweet) + '\n' ) | |
self.num_tweets += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* | |
//* See the JS Fiddle: http://jsfiddle.net/sxcjmoj5/3/ | |
//* | |
//* | |
// make sure ngSanitize module is installed: | |
// https://docs.angularjs.org/api/ngSanitize | |
// | |
// To convert links from plaintext, you must use the linky filter which is included with ngSanitize | |
// https://docs.angularjs.org/api/ngSanitize/filter/linky | |
// |