How to use the Twitter API v1.1 with Python to stream tweets

sentdex · 171K views · 2013 · 13:51

Open on YouTube

Python, Ruby & scripting languagesWeb developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they followed when setting up tweepy and Twitter streaming, usually while asking about errors that came up afterwards.

Recommended by 0 people across 0 different months, 2014 to 2016.

What it is

A 2013 tutorial by sentdex showing how to use Twitter's API v1.1 from Python to stream tweets, including setting up keys and a basic streaming script. It is part of a short series and aims to be simpler than Twitter's very large official documentation.

What people said

Cites artifex_somnia · 2014-05 · Stack Overflow · on “Error Twitter. Max retries exceeded (Correct keys used)”

I'm using tweepy and trying to run the basic script as shown by this video [this video] . I was previously receiving 401 errors (unsynchronized time zones) but am using the provided keys. I fixed that problem and now I'm getting this result: Traceback (most recent call last): File "algotest.py", line 25, in <module> twitterStream.filter(track=["North"]) File "/usr/local/lib/python2.7/dist-packages/tweepy-2.3-py2.7.egg/tweepy/streaming.py", line 313, in filter File "/usr/local/lib/python2.7/dist-packages/tweepy-2.3-py2.7.egg/tweepy/streaming.py", line 235, in _start File "/usr/local/lib/python2.7/dist-packages/tweepy-2.3-py2.7.egg/tweepy/streaming.py", line 151, in _run File "/usr/local/lib/python

Cites Enrico · 2015-04 · Stack Overflow · on “Tweepy: Filtering stream gives multiple errors”

I'm trying to run the following script from this tutorial tulane.edu-twitter [LINK] and I'm getting the following errors: File "GetTextFromTwitter.py", line 61, in <module> stream.filter(track=['de'], languages=['es']) File "/Users/enricok/anaconda/lib/python2.7/site-packages/tweepy/streaming.py", line 428, in filter self._start(async) File "/Users/enricok/anaconda/lib/python2.7/site-packages/tweepy/streaming.py", line 346, in _start self._run() File "/Users/enricok/anaconda/lib/python2.7/site-packages/tweepy/streaming.py", line 239, in _run verify=self.verify) File "/Users/enricok/anaconda/lib/python2.7/site-packages/requests/sessions.py", line 465, in request resp = self.send(prep, **send_

Cites Richard G · 2016-10 · Stack Overflow · on “Unable to Import the Tweepy Module to Python”

I entered import tweepy from IDLE (GUI Interface) as you suggested and I got the same error message. When I downloaded tweepy I placed the file on my desktop. I followed the instructions of this youtuber to install tweepy - [this video] I am not sure if my Python folder has site-packages? The folder structure for me looks as follows C:\Python27\ArcGIS10.4