Python script that fetches tweets based on a search term and puts them into a MongoDB database
- Twython
- Pymongo
- A running MongoDB database
- A
config.py
files (seeconfig.py.example
and the list beneath)
- The
collect_sources
list contains tuples of respectively the term for which to search with the Twitter API and the destination collection in the MongoDB database. - The Twitter configuration settings in
config.py
can be obtained by registering your own application here. - The
BOXCAR_KEY
is used to push a notification to your device after the script is done collecting. The key can be obtained by logging in to Boxcar, going to the Settings page and copying the Access Token.