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 = ''
8
8
TWITTER_CONSUMER_SECRET = ' '
9
9
TWITTER_ACCESS_TOKEN = ' '
10
10
TWITTER_ACCESS_TOKEN_SECRET = ' '
11
+ TWITTER_LISTENER_TRACK = ' @_collectorapp_'
12
+
11
13
12
14
DB_HOST = ' mysql'
13
15
DB_PORT = ' 3306'
Original file line number Diff line number Diff line change 31
31
"access_token_secret" : os .environ .get ("TWITTER_ACCESS_TOKEN_SECRET" )
32
32
}
33
33
34
+ # TWITTER BOT LISTENER
35
+ TWITTER_LISTENER_TRACK = os .environ .get ("TWITTER_LISTENER_TRACK" )
36
+
34
37
# DJANGO SOCIAL AUTH CONFIGS
35
38
SOCIAL_AUTH_TWITTER_KEY = TWITTER_SECRETS ['consumer_key' ]
36
39
SOCIAL_AUTH_TWITTER_SECRET = TWITTER_SECRETS ['consumer_secret' ]
Original file line number Diff line number Diff line change 1
1
from lib .CollectorBot .listener import StreamListener
2
2
from utils .logger import logger
3
+ from django .conf import settings
4
+
3
5
4
6
def run ():
5
7
logger .info ('Tweepy stream started' )
6
8
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