Exemplo n.º 1
0
def trump():
    candidate = 'realDonaldTrump'
    new_tweet = None
    while not new_tweet:
      try:
        new_tweet = generate_tweet(candidate,2009,2016)
      except:
        #eh 
        pass
      return render_template('tweet.html',
                             title='Trump Tweet Machine',
                             slogan='Making America great again, one tweet at a time',
                             candidate='Trump',
                             tweet=new_tweet[0], 
                             references=new_tweet[1],
                             num_ref = new_tweet[2],
                             counts= new_tweet[3],
                             back_img = ['static/trump.jpg','static/trump2.jpg','static/trump3.jpg','static/trump4.jpg','static/trump5.jpg'])
Exemplo n.º 2
0
def clinton():
    print "called clinton"
    candidate = 'HillaryClinton'
    new_tweet = None
    while not new_tweet:
      try:
        new_tweet = generate_tweet(candidate,2013,2016)
      except:
        #eh 
        pass
    return render_template('tweet.html',
                           title='Clinton Tweet Machine',
                           candidate='Clinton',
                           slogan="I'm with her... on Twitter, and also we're stronger together",
                           tweet=new_tweet[0], 
                           references=new_tweet[1],
                           num_ref = new_tweet[2],
                           counts= new_tweet[3],
                           back_img = ['static/clinton4.jpg','static/clinton.jpg','static/clinton3.jpg','static/clinton5.jpg','static/clinton2.jpg'])