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
1
vote
2 answers

Cannot import name find_packages?

This is likely a rookie error, but im in the early stages of learning python. Running Win7 64bit Python is 2.7.2 64bit, python runs fine from CMD prompt. I downloaded TweetStream. and its under c:/ Opened the setup.py in pyscripter. Executing it, I…
jakc
  • 1,161
  • 3
  • 15
  • 42
0
votes
1 answer

Ruby tweetstream stop unexpectedly

I use tweetstream gem to get sample tweets from Twitter Streaming API: TweetStream.configure do |config| config.username = 'my_username' config.password = 'my_password' config.auth_method = :basic end @client =…
daisy
  • 47
  • 1
  • 8
0
votes
0 answers

query build: academictwitteR

I have two question about academictwitteR package: NO.1 I wan to get tweets contains: ((word1 OR word2)AND(wordA OR wordB))OR word* I get what I want with below code: get_all_tweets( query = c("word1 wordA","word1 wordB","word2 wordA","word2…
Foulball
  • 61
  • 8
0
votes
0 answers

Finding missing geo-location of tweets using Python

I have twitter datasets out of which have very few have geo-location tags (lat,long). I would like to find or estimate the locations of tweets as much as possible. So, I am just wondering, how can I do this using python? Any example! So far, I…
Ankita
  • 485
  • 5
  • 18
0
votes
0 answers

how i can filter tweets received from statuses/filter streaming API

I ma doing research on tweets sentiment analysis. I have number of different keywords that i want to track (track=['Trump', 'ocean', 'Democrat', 'Republican', 'gardening','BMCSoftware', 'school', 'CT', '#metoo', 'governor', 'Iran']). Problem is that…
0
votes
1 answer

extract Geo location of Tweet

Is there any way we culd extract Geo location of tweet, even when user did not enable the location? I am looking to collect tweets from specific states for sentiment analysis of tweets. Please help class StdOutListener(StreamListener): #class allow…
0
votes
1 answer

Problem of Python running code error on Pycharm

I'm using Pycharm professional 2019.03 to execute Python code Streaming Twitter Filter. The running code finish unsuccessfully with message error : Traceback (most recent call last): File…
Ado
  • 31
  • 5
0
votes
1 answer

Stream a user's tweets using twitter API js

hi i am trying to stream all @elonmusk's tweets using twitter API and send his tweets to my discord server. currently i can stream tweets with the word 'meme' and send them to my discord server, here is my current code: discordClient.on('ready', ()…
Akoula
  • 1
0
votes
1 answer

Trying to find the name of a specific location from tweets

I am trying to find the name of a specific location from tweets and performing sentiment analysis on the hits I get from the search. The problem I am facing is that, I am looking for a location whose name is suppose "Sammy's Tap and Grill",…
0
votes
1 answer

ruby/rails ruby/rails How can I get all the tweets from Twitter LIST (of users) using the Twitter API?

I would like using the twitter API get all the tweets from a twitter list (of users). I would like to have a JSON response with the all the tweets in the list. Will parse the JSON to look for hashtags and create graphs. I would like to use…
mamesaye
  • 2,033
  • 2
  • 32
  • 49
0
votes
1 answer

I don't know why the second if block doesn't work?

#!/usr/bin/python from TwitterSearch import * import sys import csv tso = TwitterSearchOrder() # create a TwitterSearchOrder object tso.set_keywords(['gmo']) # let's define all words we would like to have a look for tso.set_language('en') # we…
0
votes
0 answers

TweetStream: Exclude retweets

Trying to build a Twitter app based on https://github.com/tweetstream/tweetstream. But at http://www.rubydoc.info/gems/tweetstream/TweetStream/Client -- how'd I go about ignoring retweets? This works TweetStream::Client.new.follow(14252, 53235) do…
Mark Boulder
  • 13,577
  • 12
  • 48
  • 78
0
votes
1 answer

Reduction in georeferenced tweets

While streaming twitter data, I found that there has been an obvious reduction in geo-referenced tweets (tweets with lat and lon). Is it because of the Foursquare information integration? Or are there any other issues? Many thanks!
user2146141
  • 155
  • 1
  • 14
0
votes
1 answer

How to mock a streaming API with RSpec?

I'm playing around with the tweetstream gem, which simplifies interaction with the Twitter streaming API. I'm streaming all tweets just like the code example shown on the gem's page: TweetStream::Client.new.sample do |status| puts…
0
votes
1 answer

Twitter Stream API - Should hashtag include #?

I'm using TweetStream to use Twitter Streaming API. Talking with my colleagues (and also in my memory) when tracking hashstag the # should not be included, but I cannot find any indications about it anymore in the documentation. Also in another…
Enrico Carlesso
  • 6,818
  • 4
  • 34
  • 42