Python: problems getting a .aspx login page

Problem: I searched several websites / blogs, etc., to find a solution, but did not get to what I was looking for. In short, I would like to clear the site, but to get to this site, I need to go through the login page.

What I did: I managed to use urllib2 and httplib to open the page, but even after logging in (it displays without errors), the login page is not redirected, as shown in the browser. My code was no different from what was shown here: How to use Python to enter a web page and receive cookies for later use? ; except that I did not use cookies.

What am I looking for? I'm not quite sure what fields I need to look for besides the fields "username" and "password". What would I like to do for the script: 1) Successfully go to the .aspx website and show a message that the login was successful 2) Transfer to another page after logging in so that I delete the data from the site. 3) How to collect site POST / GET fields, so I know that I am passing / calling the necessary parameters?

Any help / help / advice would be greatly appreciated.

+3
source share

All Articles