Uses the Twitter Streaming API to track a given keyword and generate various reports about the tweets on console.
Use the package manager pip to install requirements from requirements.txt
file as follows:
pip install -r requirements.txt
- Include your credentials in
twitter_credentials.py
file and run the main script usingpython get_tweets_data.py
. - For first time run, it will download 2
nltk
sources for parts of speech recognition to remove few words in tweets. - As soon as it completes downloading the sources, you'll be asked to enter the keyword that needs to be tracked on twitter.
- Enter the keyword and hit enter.
- The script starts running and for every 1 minute it prints the data of last 5 minutes as mentioned in the task criteria in specific format - The format will also be printed console.
- For stopping the script, KeyboardInterrupt the script using
CTRL + C
. It will kill all the python running processes.