/media/sda-magnetic/david/Dokumente-14/linux/mypython/compiler28.py


#!/usr/bin/python2
# -*- coding: utf-8 -*-
from twython import Twython
import tweepy

APP_KEY = "IL2cl4l0utXc1aStFKvZNkS0F"
APP_SECRET = "JtGkcWmyzQDWVpiVeM9mFUWSAYqjAux4z6p4qUVoSVuLuJlFps"
OAUTH_TOKEN = "1206083934603431936-fZ9vf2mVrNaIW04DoPBKMcb3Vcd1Op"
OAUTH_TOKEN_SECRET="TSlorK1nYa9LYfA2UIgvObX4tv9m50kKv2o2H4abhWQPY"

import tweepy

# Authenticate to Twitter
auth = tweepy.OAuthHandler(APP_KEY, APP_SECRET)
auth.set_access_token(OAUTH_TOKEN, OAUTH_TOKEN_SECRET)

# Create API object
api = tweepy.API(auth, wait_on_rate_limit=True)

timeline = api.user_timeline()
for tweet in timeline:
    print(f"{tweet.text}")
    if tweet.text.find("COMPILER:", 0, len("COMPILER:"))!=-1:
        datei = open('./compiler2.txt','w')
        datei.write(f"{tweet.text}")
        break
    elif tweet.text.find("COMPILER:")!=-1:
        datei = open('./compiler2.txt','w')
        datei.write(f"{tweet.text}")
        break