File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ TWITTER_CONSUMER_KEY = ''
88TWITTER_CONSUMER_SECRET = ' '
99TWITTER_ACCESS_TOKEN = ' '
1010TWITTER_ACCESS_TOKEN_SECRET = ' '
11+ TWITTER_LISTENER_TRACK = ' @_collectorapp_'
12+
1113
1214DB_HOST = ' mysql'
1315DB_PORT = ' 3306'
Original file line number Diff line number Diff line change 3131 "access_token_secret" : os .environ .get ("TWITTER_ACCESS_TOKEN_SECRET" )
3232}
3333
34+ # TWITTER BOT LISTENER
35+ TWITTER_LISTENER_TRACK = os .environ .get ("TWITTER_LISTENER_TRACK" )
36+
3437# DJANGO SOCIAL AUTH CONFIGS
3538SOCIAL_AUTH_TWITTER_KEY = TWITTER_SECRETS ['consumer_key' ]
3639SOCIAL_AUTH_TWITTER_SECRET = TWITTER_SECRETS ['consumer_secret' ]
Original file line number Diff line number Diff line change 11from lib .CollectorBot .listener import StreamListener
22from utils .logger import logger
3+ from django .conf import settings
4+
35
46def run ():
57 logger .info ('Tweepy stream started' )
68 stream_listener = StreamListener ()
7- stream_listener .filter (track = ['@_collectorapp_' ], stall_warnings = True )
9+ stream_listener .filter (
10+ track = [settings .TWITTER_LISTENER_TRACK ],
11+ stall_warnings = True )
You can’t perform that action at this time.
0 commit comments