Skip to content

Instantly share code, notes, and snippets.

@dav-s
Last active August 29, 2015 14:09
Show Gist options
  • Save dav-s/8e271bf37914bd1c2195 to your computer and use it in GitHub Desktop.
Save dav-s/8e271bf37914bd1c2195 to your computer and use it in GitHub Desktop.
Vote away plebs
#This is for python 2.7... haven't tested in 3
import httplib
burl = "surveygizmo.com"
conn = httplib.HTTPConnection(burl)
while True:
conn.request("GET", "/s3/polljs/1884690-MNWLMHGHU97FS5A35VC581ZMTGGPZE/")
getreq = conn.getresponse()
gresp = getreq.read()
sessid = gresp.split("sg_session")[2].split("value=")[1].split(">")[0][2:-5]
print sessid
vnum = "1"
conn.request("POST", "/s3/polljs/1884690-MNWLMHGHU97FS5A35VC581ZMTGGPZE/?_vote=sg_navchoice%3D%26sg_currentpageid%3D3%26sg_surveyident%3D1884690%26__ref%3D%26sg_interactionlevel%3D0%26sg_sessionid%3D"+sessid+"%26sgE-1884690-3-2-meta%3Dhidden%253Dfalse%2526required%253Dfalse%26sgE-1884690-3-2-time%3D685.938%26sgE-1884690-3-2%3D1000"+vnum)
preq = conn.getresponse()
preq.read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment