Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

pyTwitterCollector (v 0.2 - March 28, 2013)

pyTwitterCollector was originally written by Yazan Hussein ( while working for the Collaboration and Social Media Lab at the Illinois Institute of Technology ( You can also email the director of the lab, Libby Hemphill (, with questions.

Planned changes:

  • collect data about followers as well
  • update DB schema diagram


pyTwitterCollector was written for Python 2.7. It has not been testing on other versions.

  • mysql-python
  • tweepy


Before you start pyTwitterCollector, you need a database to store the tweets. Use TwitterCollector.sql to create it. Make sure you grant permissions on that DB to the user you specify in the config file. Configuration

collector.config must be configured prior to starting The configuration file must contain the following:

###DB Info

Template of the [db_info] section:

	#this is a comment
	host = localhost
	db_user = username
	db_pass = password

User Info

At least one user section must be defined, but you can define more than one.

Template of the user section:

	# This is a comment.
	# You can add as many comments as you want
	# You can define more than one user. A new thread will be created for each user.
	# OAuth settings
	con_key = Consumer key for your Twitter app
	con_secret = Consumer secret for your Twitter app
	key = Access token from your Twitter app
	secret = Access token secret from your Twitter app
	# DB to store the tweets
	db = database to store tweets. The user defined under [db_info] must have access to the db specified
	# Tracking settings
	# By default, pyTwitterCollector tracks the accounts followed by user1. 
	# You may also track Twitter lists or a local list of Twitter IDs
	# To specify Twitter lists, use format owner:slug, owner2:slug2
	lists = None 
	include_path = (optional) full_path


Starting will load the config file and start collecting tweets. A log file will be created in the same directory. This log file will contain info, warnings and errors. Check this file when debugging the collector. The default config file is 'collector.config'. This file must be stored in the same directory as or can be set at run rime using the "-c" option. -c path_to_config_file &


A python-backed app for collecting from the Twitter Streaming API using user_id filter



No releases published


No packages published