This is a tutorial aimed at users new to Python but looking to dive into a real world project by querying the Twitter API. The project idea and some other ideas were liberally borrowed from the Boston Python Group.
In this project, you will adapt an existing script which queries the Twitter API to print out the users and tweet text for a Twitter search.
This example requires the Requests module. Please download the module and install it. If you are already familiar with pip, feel free to install Requests with it.
Unzip the Requests package and install it by executing:
python setup.py install
- Learn about imports and modules
- Learn about loops
- Use lists and dictionaries
- Argument parsing
- Have fun searching Twitter
Try executing the following
python sample_search.py python sample_search.py -h python sample_search.py "#Python" python sample_search.py "@sandiegopython"