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.

11 comments

  • Jacob Lewis

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Jacob (714) 500-7363

  • Joe Celine

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Joe (714) 908-9255

  • Joe Celine

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Joe (714) 908-9255

  • Joe Thompson

    Hi, I don't see any recent reviews on your Google Business Profile. I can fix that for you if you would like, simply reply to this message and I'll send you a quick explainer video. Regards Joe (714) 617-7866

  • Joe Celine

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Joe (714) 908-9255

  • Paul Brown

    Hi, I see that you're not using GMB chat on your Google business profile. GMB chat allows you to engage your potential customers in real-time. Would you like me to send you a quick explainer video? Regards Paul 202-410-9218

  • Joe Thompson

    Hi, We will help you to Outperform your competition with generation of Positive Online Reviews on auto pilot. Give us just 15 minutes of your time to showcase our solution and it will be the best thing you have done for your business! Schedule a call [] to arrange a free 14-day trial (no credit card required). Regards Joe (714) 617-7866

  • Joe Celine

    Hi there I’ve been through your website, and if you’re wondering why more of your visitors aren’t turning into sales, I have the answer for you. Would you like a free report on this? Regards Joe (669) 206-0526

  • Joe Celine

    Hi there I’ve been through your website, and if you’re wondering why more of your visitors aren’t turning into sales, I have the answer for you. Would you like a free report on this? Regards Joe (669) 206-0526

  • Paul Brown

    Hi, I see that you're not using GMB chat on your Google business profile. GMB chat allows you to engage your potential customers in real-time. Would you like me to send you a quick explainer video? Regards Paul 202-410-9218

  • Joe Thompson

    Hi, We will help you to Outperform your competition with generation of Positive Online Reviews on auto pilot. Give us just 15 minutes of your time to showcase our solution and it will be the best thing you have done for your business! Reply to this mail & ask for a free 14-day trial (no credit card required). Regards Joe (714) 617-7866