I wrote a script towards the end of my spring semester in 2015 that automated course registration for me. I was two days late to registering for fall 2015 when the registration window opened. At that time, all the classes I wanted were full and I was getting frustrated because everytime I’d get a notification for an empty seat, I either wouldn’t get to the registration page on time or I’d be in class or outside not able to log in. I had thought of writing a script to automate registration but I didn’t think I’d be able to do it even though I’ve had experience with web scraping.

A friend of mine also challenged me to write the registration bot. I realized this could be of use for a lot of people here at Penn State and so I decided to work on the script on a weekend. I had a working script done in that weekend but it took over a month to perfect the script.

Just a log output of the class seat query every few seconds. The key is the section course id and value is empty seats




Thoughts


I felt like the idea of making something like this was a little over the top for me because I didn’t think I’d be able to finish it let alone start it. Though, I nudged myself one day just to get started on this script and surprisingly, it didn’t seem too complicated work on at all. Two days of writing ruby code and viola, a working script that did everything I wanted!

I’d say that working on this project has given me a newfound confidence to work on ambitious projects I would’ve otherwise avoided. It has also changed my mentality on approaching projects: LESS THINKING, MORE WRITING! Of course it’s not the go-to approach to all kinds of projects. It’s just an approach to get started on projects and I like it because well, you immediately start working on the project!

TODO


There is an endpoint on Penn States web servers that allows you to query seat availability for courses. My script posts to that endpoint every few seconds or so and it’d be likely that someone would detect such an activity. So to work a way around this, I thought of having Penn States notification system send a text to a Twillio number instead of my personal number. That way I can set up a callback url to receive the text from Penn State and parse it to get the course and course level instead of having to overload Penn States webservers by posting to it every few seconds. Having received the course prefix and number