Skip to content

Commit f189276

Browse files
committed
handled version change. latest 3.7.0 tweepy
1 parent 69bf0cc commit f189276

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ chardet==3.0.4
33
Click==7.0
44
Flask==1.0.2
55
idna==2.7
6-
ItsDangerous==1.0.0
6+
itsdangerous==1.1.0
77
Jinja2==2.10
88
MarkupSafe==1.0
99
oauthlib==2.1.0
@@ -12,6 +12,6 @@ PySocks==1.6.8
1212
requests==2.20.0
1313
requests-oauthlib==1.0.0
1414
six==1.11.0
15-
tweepy==3.6.0
15+
tweepy==3.7.0
1616
urllib3==1.24
1717
Werkzeug==0.14.1

streamtest.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import tweepy
12
from tweepy.streaming import StreamListener
23
from tweepy import OAuthHandler
34
from tweepy import Stream
@@ -32,7 +33,7 @@
3233

3334
auth = OAuthHandler(consumer_key, consumer_secret)
3435
auth.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--------------------

0 commit comments

Comments
 (0)