This is a Python script meant to run in the background to collect tweets from a given handle. It requires a Twitter developer account for the consumer and access tokens and secrets. Check out the following link for more information.
Before getting started, you'll need to create the following two files:
# keys.py
CONSUMER_KEY="abcdef"
CONSUMER_SECRET="qwerty"
ACCESS_TOKEN="asdf"
ACCESS_TOKEN_SECRET="foobar"
# config.py
FARM_PATH="/a/b/c"
FARM_PATH
is where the raw data will be stored when collecting the tweets.
pip install -r requirements.txt
usage: collect_tweets.py [-h] --handle HANDLE
Collects tweets for the farm!
optional arguments:
-h, --help show this help message and exit
--handle HANDLE Twitter handle
python collect_tweets.py --handle POTUS
Note: the handle doesn't need the @
character in front of it.