I had a few too many drinks last night, and made a Twitter bot called @LatourSwag as a birthday present for Ben Abraham.
Basically how it works is I get the last 100 Twitter search results for “#swag” that also contain the word “and”. Then I grab the last 100 tweets from @LatourBot. I take every #swag tweet that’s not an RT and push it to an array. I take every @latourbot tweet that has “and” or “,” in it, and push it to an array. Then I say there’s a 50% chance it will be latour-then-swag, and 50% that it will be swag-then-latour. If Latour comes first, I take a random Latour tweet from the array and take all the text up to the “and” or the “,”. Then I take a random swag tweet and take the text after the “and” in it. Then I do latour + ” and ” + swag. There you go.
It’s slightly more complicated than that, but mostly it’s just a few tweaks I did to make sure I had enough Latour quotes to pick from. The results are actually pretty good sometimes!
I learned later that Mille Plateaux (A Thousand Plateaus) was the name of a book and a cheerleader! #swag
— Latour Swag (@LatourSwag) January 12, 2013
Orly was the prototype with laboratory methods; the CET is still the prototype and badass she is!! #SWAG!
— Latour Swag (@LatourSwag) January 12, 2013
In the other area (“the secretariat”) there are typewriters and dancing #drunk #vodka #vegas #swag #dope #drinks #bff
— Latour Swag (@LatourSwag) January 12, 2013
The technician who sacrificed the guinea pig is held responsible and shyt mua fuckas aint no shit to me #blazeit #swag #yolo
— Latour Swag (@LatourSwag) January 12, 2013
LOL the moment u understand subtweets and set free.
— Latour Swag (@LatourSwag) January 12, 2013
{ 5 comments }
You have *way* too much time on your hands, my friend… :)
It took 2 hours!! I just do this instead of playing videogames or reading.
When you put it that way, it makes me think of all the time I waste reading. >:)
Can you email me instructions on how you created this twitter bot?
Hi, you can find the source code here: https://github.com/dariusk/latourswag
You might also be interested in this other article I wrote on making a different twitter bot (it follows the same general pattern): http://tinysubversions.com/2012/05/how-i-built-metaphor-a-minute/
Comments on this entry are closed.