Exemple #1
0
 def __init__(self):
     register_default_functions()
     StreamListener.__init__(self)
     try:
         self.username = settings.TWITTER_USERNAME
         self.password = settings.TWITTER_PASSWORD
     except AttributeError:
         print "TWITTER_USERNAME and TWITTER_PASSWORD not defined in settings.py"
         self.username = raw_input('Twitter username: '******'Twitter password: ')
     self.status_lock = RLock()
     self.statuses = []
     self.query_builder = gen_query_builder()
     self.stream = None
Exemple #2
0
 def __init__(self):
     register_default_functions()
     StreamListener.__init__(self)
     try:
         self.username = settings.TWITTER_USERNAME
         self.password = settings.TWITTER_PASSWORD
     except AttributeError:
         print "TWITTER_USERNAME and TWITTER_PASSWORD not defined in settings.py"
         self.username = raw_input('Twitter username: '******'Twitter password: ')
     self.status_lock = RLock()
     self.statuses = []
     self.query_builder = gen_query_builder()
     self.stream = None
Exemple #3
0
 def __init__(self):
     register_default_functions()
     StreamListener.__init__(self)
     try:
         self.username = settings.TWITTER_USERNAME
         self.password = settings.TWITTER_PASSWORD
     except AttributeError:
         print "TWITTER_USERNAME and TWITTER_PASSWORD not defined in settings.py"
         self.username = raw_input('Twitter username: '******'Twitter password: ')
     self.status_lock = RLock()
     self.statuses = []
     self.query_builder = gen_query_builder()
     self.stream = None
     # initializing database engine - could have done this anywhere. do it here for now
     StatusSource.set_engine()
Exemple #4
0
    def __init__(self):
        register_default_functions()
        StreamListener.__init__(self)
        try:
			self.consumer_key = settings.CONSUMER_KEY
			self.consumer_secret = settings.CONSUMER_SECRET
			self.access_token = settings.ACCESS_TOKEN
			self.access_token_secret = settings.ACCESS_TOKEN_SECRET
        except AttributeError:
            print "Check if CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, and ACCESS_TOKEN_SECRET are defined in settings.py"
            self.consumer_key = raw_input('Consumer key: ')
            self.consumer_secret = getpass('Consumer secret: ')
            self.access_token = raw_input('Access token: ')
            self.access_token_secret = getpass('Access token secret: ')
        self.status_lock = RLock()
        self.statuses = []
        self.query_builder = gen_query_builder()
        self.stream = None
Exemple #5
0
 def __init__(self):
     register_default_functions()
     StreamListener.__init__(self)
     try:
         self.consumer_key = settings.CONSUMER_KEY
         self.consumer_secret = settings.CONSUMER_SECRET
         self.access_token = settings.ACCESS_TOKEN
         self.access_token_secret = settings.ACCESS_TOKEN_SECRET
     except AttributeError:
         print "Check if CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, and ACCESS_TOKEN_SECRET are defined in settings.py"
         self.consumer_key = raw_input('Consumer key: ')
         self.consumer_secret = getpass('Consumer secret: ')
         self.access_token = raw_input('Access token: ')
         self.access_token_secret = getpass('Access token secret: ')
     self.status_lock = RLock()
     self.statuses = []
     self.query_builder = gen_query_builder()
     self.stream = None