Skip to content Skip to sidebar Skip to footer

Logging In To A Web Site With Python (urllib,urllib2,cookielib): How Does One Find Necessary Information For Submission?

Preface: I understand that there are many responses for similar questions such as this on stack overflow. However, I haven't found anything relating to aspx log ins, nor an exact

Solution 1:

The approach you outlined will be difficult if the form is dynamic in any way. A more universal way is to install Google Chrome Canary which has good developer tools, click "inspect page", then go to "Network" tab, and mark "Preserve log". (You may need the Canary version, because the regular one doesn't catch some of the data if I'm not mistaken)

With all this open, click "login", and you'll see all the requests and headers and POST data. This will give you all the POST data that is sent to the server.

Now, you can test the data in your script, and remove it one by one. Another option for testing the requests is to use Advanced REST Client, by the way.

Post a Comment for "Logging In To A Web Site With Python (urllib,urllib2,cookielib): How Does One Find Necessary Information For Submission?"