Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.01 KB

File metadata and controls

49 lines (32 loc) · 1.01 KB

Welcome to the Twitter Farm!

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.

Getting Started

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.

Next Step

pip install -r requirements.txt

Harvest Tweets

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.