Rick Astley
Oct. 2nd, 2008 05:44 pmOK, so I presume you all know what a Rick Roll is?
Please see this Wikipedia link: http://en.wikipedia.org/wiki/Rickrolling if you don't.
Well, it seems that we have the MTV music awards up 'soon'.
And wouldn't you know? Rick's up, for 'Best Act Ever'. http://news.bbc.co.uk/1/hi/entertainment/7646807.stm
It seems that MTV are good at this voting thing. They have their website: http://ema.mtv.co.uk/vote
And it even says... 'please vote again, to make sure your favourite wins'.
4chan noticed.
So now there's a little bit of Python doing the rounds, which submits votes to MTV.
It seems somehow a cutting irony that he's doing so well, with a 20 year old song, based ... pretty much on how funny 4chan thinks it is.
I'm quite impressed at how simple a language it is, to do that. You may need to download a python interpreter to run it, mind. Which you can get from: http://www.python.org/download/
I've installed a copy, purely for academic curiousity you under stand. But really, what better reason to learn Python?
Please see this Wikipedia link: http://en.wikipedia.org/wiki/Rickrolling if you don't.
Well, it seems that we have the MTV music awards up 'soon'.
And wouldn't you know? Rick's up, for 'Best Act Ever'. http://news.bbc.co.uk/1/hi/entertainment/7646807.stm
It seems that MTV are good at this voting thing. They have their website: http://ema.mtv.co.uk/vote
And it even says... 'please vote again, to make sure your favourite wins'.
4chan noticed.
So now there's a little bit of Python doing the rounds, which submits votes to MTV.
It seems somehow a cutting irony that he's doing so well, with a 20 year old song, based ... pretty much on how funny 4chan thinks it is.
#!/usr/bin/env python
import urllib2
import urllib
import time
num = 1000000 # The number of times to iterate
params = {}
params['fields[category]'] = 'Best Act Ever'
params['fields[artist]'] = 'Rick Astley'
params['action[suggestions]'] = 'Vote'
params = urllib.urlencode(params)
for x in range(num):
try:
print "Running iteration #%s" % x
time.sleep(1)
req = urllib2.Request(url='http://ema.mtv.co.uk/vote/', data=params)
urllib2.urlopen(req)
except:
print "MTV server seems stressed. BUT THE SPAM MUST GO ON"
I'm quite impressed at how simple a language it is, to do that. You may need to download a python interpreter to run it, mind. Which you can get from: http://www.python.org/download/
I've installed a copy, purely for academic curiousity you under stand. But really, what better reason to learn Python?