Explorar el Código

new file: config.py

new file:   twitter.py
master
TheBidouilleur hace 7 meses
padre
commit
1b6c734256
Se han modificado 3 ficheros con 37 adiciones y 0 borrados
  1. BIN
      __pycache__/config.cpython-36.pyc
  2. +15
    -0
      config.py
  3. +22
    -0
      twitter.py

BIN
__pycache__/config.cpython-36.pyc Ver fichero


+ 15
- 0
config.py Ver fichero

@@ -0,0 +1,15 @@
#Twitter Information

twitter = {
'consumer_key' : "xxxxxxxxxxxxxxxx",
'consumer_secret' : "xxxxxxxxxxxxxxxx",
'access_token' : "xxxxxxxxxxxxxxxx",
'access_token_secret' : "xxxxxxxxxxxxxxxx"
}

def main():

print(twitter)

if __name__ == '__main__':
main()

+ 22
- 0
twitter.py Ver fichero

@@ -0,0 +1,22 @@
from config import twitter
import tweepy
# auth = tweepy.OAuthHandler(twitter['consumer_key'], twitter['consumer_secret'])



def tweet(message):
# authentication of access token and secret
auth.set_access_token(twitter['access_token'], twitter['access_token_secret'])
api = tweepy.API(auth)
# update the status
api.update_status(status = message)



def main():
print("Nothing to do here")


if __name__ == '__main__':
main()

Cargando…
Cancelar
Guardar