Using python, how can I submit a form that 1) uses asp, 2) uses javascript, and 3) points back to the same page? -
those 3 things can tell form trying submit using python. trying scrape database found here, individuals.
the form's "action" points straight searchindividual.aspx when results displayed on searchresults.aspx. that's 1 thing unsure how handle.
the form's "onsubmit" performs javascript function unsure of.
what can tell type of technique has been successful me in past, isn't duplicable situation:
import urllib, urllib2 mydata=[('ctl00$ctl00$maincontent$maincontent$sclastname','smith')] mydata=urllib.urlencode(mydata) path='http://pfr.informe.org/almsonline/almsquery/searchresults.aspx' req=urllib2.request(path, mydata) req.add_header("content-type", "application/x-www-form-urlencoded") page=urllib2.urlopen(req).read() print page
Comments
Post a Comment