Getting information with python urllib from a page that is executed via __doPostBack ()?

I am trying to parse a page with different sections that are loaded with the Javascript __doPostBack () function.

Link example: javascript: __ doPostBack ('ctl00 $ cphMain $ ucOemSchPicker $ dlSch $ ctl03 $ btnSch', '')

Once clicked, the browser does not retrieve the new URL, but the section of the web page is updated to reflect the new information.

What would I go to urllib function to complete the operation?

+2


source to share


1 answer


javascript:__doPostBack('...

      

(Urg. This is a sad and disgusting approach.)



A simple general-purpose approach for finding URLs whose logic is similar to JavaScript is to run the page normally using a network debugger (such as Net's "Firebug" tab or Fiddler). By monitoring the request made on click, you can see which url and which parameters of the POST request body should be passed.

You need to use an argument data

urlopen

to send POST request bodies.

+1


source







All Articles