示例#1
0
def tweet():
    message = generate(dirty=False)
    consumer_key = os.environ.get("TWITTER_CONSUMER_KEY")
    consumer_secret = os.environ.get("TWITTER_CONSUMER_SECRET")
    access_token = os.environ.get("TWITTER_ACCESS_TOKEN")
    access_token_secret = os.environ.get("TWITTER_ACCESS_TOKEN_SECRET")

    auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
    auth.set_access_token(access_token, access_token_secret)
    api = tweepy.API(auth)
    api.update_status(message)
示例#2
0
def get_horoscope():
    return render_template("horoscope.html", horoscope=horoscope.generate())
示例#3
0
def get_dirty_horoscope():
    return render_template("horoscope.html",
                           horoscope=horoscope.generate(dirty=True))
示例#4
0
from bullshit.horoscope import generate

message = generate(dirty=False)

print(message)
示例#5
0
def get_horoscope():
	return render_template("horoscope.html", horoscope=horoscope.generate())
示例#6
0
def get_dirty_horoscope():
	return render_template("horoscope.html", horoscope=horoscope.generate(dirty=True))