Get Mechanize to handle cookies from an arbitrary POST (to log into a website programmatically)
- by Horace Loeb
I want to log into https://www.t-mobile.com/ programmatically. My first idea was to use Mechanize to submit the login form:
However, it turns out that this isn't even a real form. Instead, when you click "Log in" some javascript grabs the values of the fields, creates a new form dynamically, and submits it.
"Log in" button HTML:
<button…