Skip to content

Instantly share code, notes, and snippets.

@moeamaya
Last active December 21, 2015 21:58
Show Gist options
  • Save moeamaya/6371793 to your computer and use it in GitHub Desktop.
Save moeamaya/6371793 to your computer and use it in GitHub Desktop.
import urllib
import urllib2
NUM_OF_VOTES = 100
url = ('https://docs.google.com/forms/d/1P53FSdQV1FdeCvMSgYzxKm-PqzdnyqTcDa7eox-_7cw/formResponse')
#vote for Moe
params = {
#name
"entry.1868555665":"SCRIPT",
# first place
"entry.1525706799":"Design 6",
# second place
"entry.909365650":"Design 6"
}
#encode the dictionary values
data = urllib.urlencode(params)
#send POST request n-times
for i in range( NUM_OF_VOTES ):
request = urllib2.Request(url,data)
response = urllib2.urlopen(request)
page = response.read(200000)
print page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment