Accessing Meal Swipe Information (Python)
The app "The Ropes" for Dartmouth displays the swipes remaining and DBA on your account if given your ManageMyID information. I was curious as to how easily that could be replicated in Python, and then in my own app.
In Python, it's relatively easy, though it took me a while to figure out where I was going wrong. It turns out that when the website is generated, JavaScript code runs to insert a hidden input into the form, with a session token variable called "__sesstok". However, this is also generated in the HTML when the PHP is accessed, and doesn't change until the form is submitted. Luckily, this means that with a simple GET request, you can extract the session token, and use it in a POST to the same login with your credentials.
The source code (with main details blocked out) can be viewed here, in my GitHub account.
Jo Riggs
Hi, I just visited blog.alexbeals.com and wondered if you'd ever thought about having an engaging video to explain what you do? Our videos cost just $195 for a 30 second video ($239 for 60 seconds) and include a full script, voice-over and video. I can show you some previous videos we've done if you want me to send some over. Let me know if you're interested in seeing samples of our previous work. Regards, Jo