Categories
Mastering Development

Scraping ASPX after login with Python but every login gives you a different URL

I’m trying to get the exam result data from my college website for every Roll No. in my class.

Normally you can POST url (www.example.com/login.aspx)with login information, and GET a fixed url after login(www.example.com/home.aspx).

But the page I’m trying to get has a different URL for every Roll no. entered. The URL of login page look like this: "www.example.com/View.aspx". After login, the URL of the result page looks like: "www.example.com/ovengine.aspx?enc=BunchOfNumbersandAlphabets". And those numbers and alphabets are different for each roll number.

So I can’t put a URL in my code to get the final result. I don’t know how to get the page that comes automatically after the login, without mentioning it’s URL.

Leave a Reply

Your email address will not be published. Required fields are marked *