Code: Select all
#!/usr/bin/env python
import urllib2
import urllib
num = 100 # 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):
print "Running iteration #%s" % x
req = urllib2.Request(url='<http://ema.mtv.co.uk/vote/#!>', data=params)
urllib2.urlopen(req)