Line 44: Line 44:

Revision as of 21:35, 16 June 2015

Hello World!

Midterm Bot

This is a bot that takes a song from the band Interpol called Leif Erikson. It tries to take line by line from the lyrics and re-arrange them. My experiment was to see if some nice combinations could be created from lyrics that are very thoughtful and metaphoric.

So far the bot is running in twitter and is working, but I still need to clean it and take it a step further, I wan to take the lyrics from the song Roland (also from interpol) and mix them in one tweet, to make ir more interesting.

This is the code

import tweepy
import sys
import time
import random
from time import sleep

consumer_key = "JgAFe2vulLO4KvSvHPdNI30xA"
consumer_secret = "Zbu0zBP8g4sdS5LX4XrI9y3ddNdGfj0woSxxFgxiX5wrMNpC9X"
access_token = "3329105651-NI0NPXV2HUCRTXPueHdEhzRCoKPNwwf3vxOd5yj"
access_token_secret = "obFHhsKlQ7KlXAXOqz7c5zMf3qvYDSsfvtnw84cFBqV4N"

auth = tweepy.OAuthHandler(consumer_key, consumer_secret) = True
auth.set_access_token(access_token, access_token_secret)

api = tweepy.APIApplication Programming Interface(auth)

l = "leifErikson.txt"

leif = open (l)
print("Leif Erikson is in da house")
lines = leif.readlines()

for line in lines:
	li = line.split(' ')
	api.update_status(status = li)


My robot azu.png