Using the Twitter Streaming API, collect tweets, index, and search utilizing Lucene.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
Follow the installation instructions for Python and PyLucene
-
Requires ant: $ sudo apt-get install ant
-
Execute the following command to install and setup
./installer.shCOMPLETE THE FOLLOWING FILE
Twitter API Credentials need to be stored in the private.py file: as follows:
TWITTER_KEY = ""
TWITTER_SECRET = ""
TWITTER_APP_KEY = ""
TWITTER_APP_SECRET = ""
To run the full test execute the following command:
python3 main.py {options...}With the supported {options...}
-
--generateFile {outputFileName} -
--file {inputFileName} -
--searchIndex {searchTerm},{searchTerm},... -
--searchTwitter {outputFileName}- Queries Twitter for 10,000 teets returned for search term
-
--skipIndex {true/false}- Skips index generation if already exists
-
--maxTweetCount {integer}- Will only collect this number of tweets
-
--customPhrase {customPhrases},{customPhrases},...- Will customize the index for these specific phrases (i.e. "Hello World", "West Coast", etc.)
Examples:
python3 main.py --generateFile tweets.csv --searchIndex "Term1","Term2" --maxTweetCount 10000python3 main.py --file tweets.csv --skipIndex true --searchIndex "Term1" python3 main.py --file tweets2.csv --searchIndex "#WMPO" --customPhrases "PGA Tour","Rickie Fowler"- Trevor Van Meter - GitHub: vanmeter-t