Live data from Hacker News

How I Hacked My University's Registration System with Python and Twilio

twilio.com

81–90 of 163 posts

Re: How I Hacked My University's Registration System with Python and Twilio

#81
post #16

I remember I made this same thing when I was in undergrad b/c my uni didn't have waitlists. So people could waitlist on my app. Their priority in the waitlist is determined by a market. I remember getting SMS's in the middle of the night alerting me that a seat opened up!

"Their priority in the waitlist is determined by a market." I'm very surprised registration systems aren't (generally) some kind of phased auction. There's got be some research, experiments somewhere exploring different strategies. I worked on student facing software in higher ed. Admins were obsessed with fairness. Our registration systems had all sorts of arcane rules. Which were hard to explain, validate, troubles…

I'm very surprised prereigstration systems exist at all for college level lecture courses. Personally, I prefer the system where anyone can sign up for (almost) any class and then the university hires/reassigns teaching assistants as needed:

http://www.thecrimson.com/admissions/article/2013/9/10/cours...

Re: How I Hacked My University's Registration System with Python and Twilio

#82

For the curious, if you just want to one-off this for yourself, you probably don't need twilio to do it. Most carriers have a special domain that if you send email with the recipient's phone number, it turns into a text. I've got Verizon and its as simple as this from the command line: echo 'Text message text' | mail -s 'Subject will display in braces in the message' -a 'From: Myserver@Mydomain.com' 'number@vtext.com…

Yep, they're called SMS gateways. I don't think there's a single canonical source for them, unfortunately, but I keep this file bookmarked for when I need to look it up: https://github.com/cubiclesoft/email_sms_mms_gateways/blob/m...

Re: How I Hacked My University's Registration System with Python and Twilio

#83

Earlier quoted context omitted.

How to do that?

Put the phone number in front of a domain for each carrier, a list is here. https://github.com/WilliamFCipriano/FreeSMS/blob/master/data...

Thanks, this hack (if it's a hack) looks interesting.

Re: How I Hacked My University's Registration System with Python and Twilio

#84

Is there a generic page scraper library or toolset? I can see a ton of demand here and it seems like something you could use on your day to day. Things like this actually seem like an outlier, I'd imagine airfare would be a huge one.

The nearest thing I can think of is Scrapy (https://scrapy.org/).

For airfare, I think there's already a few players in the "this flight got cheaper" space (Kayak and Hopper come to mind), but they don't have data on some airlines (because of the airlines' ToS IIRC).

Re: How I Hacked My University's Registration System with Python and Twilio

#85

Wondering why you didn't also automate the process of actually signing up for the seat? Getting notified that a seat is open is helpful but automatically taking the open seat sounds a lot more helpful. Though at that point you'd have a lot more luck with selenium or some other web driver.

We thought about doing that but were scared of the repercussions from the school. We felt like it was much easier to argue for notification than for automatic sign-up. Luckily, we didn't get in any trouble, so we didn't have to argue it anyway.

Re: How I Hacked My University's Registration System with Python and Twilio

#86
post #43

I did this for one of my classes as well. But since it was just a one off, I just put this bash script in a cron job on a free-tier AWS ec2. It just did a quick and dirty parse of the html, which for my university wasn't behind a login wall. $seats="$(curl $URL | sed \"140qd\" | sed -nE \"s/ | //gp\")" if [ $seats -gt 0 ]; then echo "Go register for class $URL" | msmtp -a "default" $EMAIL fi

Yep. This is what I did. Also, I just used the email address for my phone's SMS. I'm not sure why you need Twilio for this, seems like over kill to me.

It's an ad for Twilio, of course Twilio is needed for that.

Re: How I Hacked My University's Registration System with Python and Twilio

#87
post #46
post #25

I was in the US and want to immigrate to Canada because of US broken H1B immigration system ( for me it will take 9 years to get a greencard). Here is what I did - The immigration website of Saskatchewan province opens up randomly to apply for immigration. I missed it many times because there is no indication other than the "Apply" button being enabled and a small text in their homepage which says "Applications are n…

> because of US broken immigration system Immigration is working just fine: It is a rate-limiting mechanism to prevent massive immigration of every "me too" person from other random countries. You're just like everyone else, and everyone else wants to get in, too. Just like a lifeboat, the US can't let everyone in at once or we'd sink. Buy a parka and enjoy Canada!

I am not like everyone else and is not dying to get in to the US as you can see that I moved to Canada. I am a highly skilled worker and was working for some of the top technology companies in the US. I should have been given preference for my Green Card. But I was queued up and backlogged to 9 years because of the country of my birth. That is not how skilled immigration should work.

The immigration system of Canada is called Express Entry and gives importance to skills than luck (H1B lottery). That's why I called US immigration system broken. I should have been specific that its the H1B system that is broken. Edited my comment for the same.

Re: How I Hacked My University's Registration System with Python and Twilio

#88
post #25

I was in the US and want to immigrate to Canada because of US broken H1B immigration system ( for me it will take 9 years to get a greencard). Here is what I did - The immigration website of Saskatchewan province opens up randomly to apply for immigration. I missed it many times because there is no indication other than the "Apply" button being enabled and a small text in their homepage which says "Applications are n…

[deleted]

Re: How I Hacked My University's Registration System with Python and Twilio

#89
post #58
post #37

I used to work in University IT and registration time is the worst. The systems never handle the load well and everyone freaks out. I think your work might anger the sysadmins b/c of the increased load.

Couldn't you just let anybody sign up for $LONG_ENOUGH_PERIOD and then randomize who gets in the classes? It sounds like a much better solution in general.

That won't work very well. You register for multiple classes at once, not just one. Which class(es) you register for are dependent on when the other classes you registered for are scheduled. It's hard to get a schedule with classes that don't overlap if you are uncertain if you'd get a seat in a couple classes.

Re: How I Hacked My University's Registration System with Python and Twilio

#90
post #41
post #25

I was in the US and want to immigrate to Canada because of US broken H1B immigration system ( for me it will take 9 years to get a greencard). Here is what I did - The immigration website of Saskatchewan province opens up randomly to apply for immigration. I missed it many times because there is no indication other than the "Apply" button being enabled and a small text in their homepage which says "Applications are n…

Nice story, and great that Twilio worked out for you - but this really is the sort of thing that email alerts (or IM alerts, or IRC alerts) should also work fine for. I would argue that the fact that you find SMS/phone calls a more urgent alert is a fault with your phone/communication setup - and twilio is an interesting hack around that. But there really should be an easy way to make just as much ruckus from a simpl…

> I would argue that the fact that you find SMS/phone calls a more urgent alert is a fault with your phone/communication setup

Doesn't the asynchronous nature of an IM make it less urgent than a synchronous phone call?

Post reply on HN