Collecting data from Twitter

In order to interact with the Twitter APIs, we need a Python client that implements the different calls to the API itself. There are several options as we can see from the official documentation ( None of them are officially maintained by Twitter and they are backed by the open source community. While there are several options to choose from, some of them almost equivalent, so we will choose to use Tweepy here as it offers a wider support for different features and is actively maintained.

The library can be installed via pip:

$ pip install tweepy==3.3.0 


Python 3 compatibility

We're specifically installing version 3.3 of Tweepy, because of an issue with the ...

Get Mastering Social Media Mining with Python now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.