Mirror of https://github.com/Jxck-S/plane-notify
This is the backend to ElonsJet and other bots
acasads-badsbadsbexchangeadsbxairportemergency-squawklandopenskyopensky-apiopensky-networkplaneresolutionadviosrysquawktakeofftcas
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
468 B
10 lines
468 B
# Authenticate to Twitter |
|
|
|
def tweepysetup(config): |
|
import tweepy |
|
#DOCU |
|
#https://realpython.com/twitter-bot-python-tweepy/ |
|
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')) |
|
tweet_api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True) |
|
return tweet_api |