Browse Source
-Tweepy 4.0.0, defTweet fix notify no longer a thing -Mictronics parse, get type code by icao -Route lookup now working for OpenSky if enabledpull/5/head
Jxck-S
3 years ago
4 changed files with 27 additions and 34 deletions
@ -1,10 +1,9 @@ |
|||||||
# Authenticate to Twitter |
# Authenticate to Twitter |
||||||
|
|
||||||
def tweepysetup(config): |
def tweepysetup(config): |
||||||
import tweepy |
import tweepy |
||||||
#DOCU |
#DOCU |
||||||
#https://realpython.com/twitter-bot-python-tweepy/ |
#https://realpython.com/twitter-bot-python-tweepy/ |
||||||
auth = tweepy.OAuthHandler(config.get('TWITTER', 'CONSUMER_KEY'), config.get('TWITTER', 'CONSUMER_SECRET')) |
auth = tweepy.OAuthHandler(config.get('TWITTER', 'CONSUMER_KEY'), config.get('TWITTER', 'CONSUMER_SECRET')) |
||||||
auth.set_access_token(config.get('TWITTER', 'ACCESS_TOKEN'), config.get('TWITTER', 'ACCESS_TOKEN_SECRET')) |
auth.set_access_token(config.get('TWITTER', 'ACCESS_TOKEN'), config.get('TWITTER', 'ACCESS_TOKEN_SECRET')) |
||||||
tweet_api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True) |
tweet_api = tweepy.API(auth, wait_on_rate_limit=True) |
||||||
return tweet_api |
return tweet_api |
Loading…
Reference in new issue