Last active
December 21, 2015 21:58
-
-
Save moeamaya/6371793 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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