Questions tagged [tweetstream]

Tweetstream provides access to Twitter's Streaming API in python or ruby

Tweetstream for ruby

Twitter’s Streaming API is one of the most exciting developments in the Twitter API in some time. It gives you the ability to create a long-standing connection to Twitter that receives “push” updates when new tweets matching certain criteria arrive, obviating the need to constantly poll for updates. TweetStream is a Ruby library to access the new API.

to install run:

gem install tweetstream

Tweetstream for python

tweetstream for python provides two classes, SampleStream and FollowStream, that can be used to get tweets from Twitter's streaming API. An instance of one of the classes can be used as an iterator. In addition to fetching tweets, the object keeps track of the number of tweets collected and the rate at which tweets are received.

SampleStream delivers a sample of all tweets. FilterStream delivers tweets that match one or more criteria. Note that it's not possible to get all tweets without access to the "firehose" stream, which is not currently avaliable to the public.

to install run:

pip install tweetstream
88 questions
18
votes
2 answers

Twitter Streaming API limits?

I understand the Twitter REST API has strict request limits (few hundred times per 15 minutes), and that the streaming API is sometimes better for retrieving live data. My question is, what exactly are the streaming API limits? Twitter references a…
7
votes
2 answers

filtering of tweets received from statuses/filter (streaming API)

I have N different keywords that i am tracking (for sake of simplicity, let N=3). So in GET statuses/filter, I will give 3 keywords in the "track" argument. Now the tweets that i will be receiving can be from ANY of the 3 keywords that i…
user1599964
  • 860
  • 2
  • 13
  • 29
7
votes
1 answer

Avoid 420s with Streaming API?

I have a python script that hooks into the Twitter Streaming API using basic authentication and making use of the tweetstream module. Im gathering around 10 tweets a minute. I was getting intermittent disconnections, so currently logging how often…
jakc
  • 1,161
  • 3
  • 15
  • 42
6
votes
1 answer

Get location specific tweets from Twitter using Tweepy

I'm trying to get tweets from a specific location using Tweepy but I get this error when I run the code raise TweepError("Wrong number of locations points, " tweepy.error.TweepError: Wrong number of locations points, it has to be a multiple of 4 In…
6
votes
2 answers

Rails on Heroku how to monitor worker process

I have a critical worker process for my Rails app that is an event machine loop on twitter feed events (Someone tweets, it automatically processes the tweet and runs different code based on content, otherwise known as the tweetstream gem). My issue…
4
votes
4 answers

how to take all tweets in a hashtag with tweepy?

I'm trying to take every open tweets in a hashtag but my code does not go further than 299 tweets. I also trying to take tweets from a specific time line like tweets only in May 2015 and July 2016. Are there any way to do it in the main process or…
shuetisha.dev
  • 109
  • 1
  • 1
  • 11
4
votes
1 answer

UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 0: unexpected end of data

I'm writing a code for stemming a tweet, but I'm having issues with encoding. When I tried to apply porter stemmer it shows error.Maybe i m not able to tokenize it properly. My code is as follows... import sys import pandas as pd import nltk import…
Vishal Kharde
  • 1,553
  • 3
  • 16
  • 34
4
votes
2 answers

How To Run EventMachine and Serve Pages In Sinatra?

I'm building a Sinatra app that uses TweetStream (which listens for Tweets using EventMachine). I would also like the app to serve pages like a normal Sinatra app but it seems like Sinatra can't "listen" for page requests when it's "listening" for…
DorkRawk
  • 732
  • 2
  • 6
  • 21
4
votes
2 answers

Python TweetStream Access Denied

I keep getting this exception from TweetStream 1.1.1, "exception.code == 404:uthenticationError("Access denied")" It worked last week and now it doesn't. I have tried different usernames and passwords. I can log into twitter with my account…
AdrianBoeh
  • 176
  • 2
  • 3
  • 14
4
votes
2 answers

Using tweetstream and timeout

Ruby version: 2.0.0-p0 Mac - Mountain Lion Following is my code (tw_stream_track.rb): require 'tweetstream' TweetStream.configure do |config| config.consumer_key = 'xxxxxxxxxxxxxxx' config.consumer_secret = 'xxxxxxxxxxxxxxx' …
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
4
votes
3 answers

Ruby - undefined method `extract_options!' : Array

While running following sample using TweetStream I am getting mentioned error. tweets.rb require 'tweetstream' TweetStream.configure do |config| config.consumer_key = '' config.consumer_secret = '' …
Amit Patel
  • 15,609
  • 18
  • 68
  • 106
4
votes
1 answer

How do I loop the restart of a daemon?

I am trying to use Ruby's daemon gem and loop the restart of a daemon that has its own loop. My code looks like this now: require 'daemons' while true listener = Daemons.call(:force => true) do users = accounts.get_updated_user_list …
DorkRawk
  • 732
  • 2
  • 6
  • 21
4
votes
1 answer

Tweetstream stops working

I'm connecting to the twitter API using the tweetstream gem as shown here. It works fine, but when I stop and restart the stream as I'm changing the way I handle the stream, after about 5 restarts over 2 hours or so the stream stops giving me…
user684934
3
votes
0 answers

Twitter streaming API not getting all retweets

I'm using the streaming API to follow a specific user id, and I'm able to stream without any issues. However, when I compare all streamed tweets collected in one day to the ones collected with the rest API it seems that the stream API missed some…
3
votes
0 answers

Install libssl-dev for Rails on Window 8.1

I'm having this error when running gem tweetstream terminate called after throwing an instance of 'std::runtime_error' what(): Encryption not available on this event-machine I understand it has something to do with my libssl. How do I install…
Victor Yee
  • 151
  • 1
  • 14
1
2 3 4 5 6