File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ chardet==3.0.4
33Click == 7.0
44Flask == 1.0.2
55idna == 2.7
6- ItsDangerous == 1.0 .0
6+ itsdangerous == 1.1 .0
77Jinja2 == 2.10
88MarkupSafe == 1.0
99oauthlib == 2.1.0
@@ -12,6 +12,6 @@ PySocks==1.6.8
1212requests == 2.20.0
1313requests-oauthlib == 1.0.0
1414six == 1.11.0
15- tweepy == 3.6 .0
15+ tweepy == 3.7 .0
1616urllib3 == 1.24
1717Werkzeug == 0.14.1
Original file line number Diff line number Diff line change 1+ import tweepy
12from tweepy .streaming import StreamListener
23from tweepy import OAuthHandler
34from tweepy import Stream
3233
3334auth = OAuthHandler (consumer_key , consumer_secret )
3435auth .set_access_token (access_token , access_token_secret )
35-
36+ api = tweepy . API ( auth )
3637
3738#----------------FLASK---ENDPOINTS-------------------
3839
@@ -54,8 +55,9 @@ def triggertweets():
5455
5556 #print(key)
5657 l = StdOutListener (key ,max_tweets )
57- stream = Stream (auth , l )
58- stream .filter (track = [key ], async = True )
58+ stream = Stream (api .auth , l )
59+ stream .filter (track = [key ])
60+ # stream.filter(track=[key], async=True)
5961 return jsonify ({"trigger" :"started" })
6062
6163#--------------New Function--------------------
You can’t perform that action at this time.
0 commit comments