Scrape tweets from twitter into a DB. Convert the DB to a CSV file.
pip install -r requirements.txt
- Create a file called
private.py. - Sign up for a Twitter developer account.
- Create an application here.
- Set the following keys in
private.py. You can get these values from the app you created:TWITTER_KEYTWITTER_SECRETTWITTER_APP_KEYTWITTER_APP_SECRET
- Set the following key in
private.py.CONNECTION_STRING-- usesqlite:///tweets.dbas a default if you need to. It's recommended to use postgresql, but not necessary.
python scrape.pyto scrape. UseCtrl + Cto stop.python dump.pyto generatetweets.csv, which contains all the tweet data that was scraped.- If you want to edit behavior, change settings in
settings.py.