I've tried the following:
How to use Python to login to a webpage and retrieve cookies for later usage?
However this requires
resp = opener.open('http://www.example.com/hiddenpage.php')
I can't know the hiddenpage link since it changes with every login and every refresh.
The page is a simple HTTP one and I used WireShark to know the input fields and they are as follows
HTML Form URL Encoded: application/x-www-form-urlencoded
Form item: "mode" = "451"
Form item: "json" = "{"username":"test1,"password":"dragon","testtest":"1","browser":"Chrome_57"}"
Form item: "__RequestType" = "ajax"
Form item: "t" = "Sat Apr 22 2017 15:05:41 GMT 0530 (India Standard Time)"
Do I have to include all the form items in the script or are they provided by default by the request library? As a user visiting the website I only provide username and password, though rest of the fields are editable as well.