Programming related question

XythXyth Avatar Join Date: 2003-11-04 Member: 22312Members
So it's time for college and one of the classes I want is full. The only way I can get into it is if someone randomly drops it and I log on just in time to notice the new slot, and take it. So, I got to thinking, I'm sure I could write a program to do this for me and just leave it running 24/7. So that's my question, how would one go about writing a program to interact with a website like this? It would have to log in as me (using username /password) select the correct category from a drop-down list, then monitor some numbers on a page. When the class becomes open it will have to check a check-box and click submit.

So, who can give me some pointers to a method of doing this?

Comments

  • GwahirGwahir Join Date: 2002-04-24 Member: 513Members, Constellation
    mozdev and regexes.
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    There's some fun ways to do it.

    If you are savvy enough, you can hook into your browser using Java.

    I would recommend AutoIt, except for some reason it doesn't parse buttons or text on a webpage.

    Building your own FireFox plugin is also quite reasonable. Should be fairly straightforward script and just have it refresh the page a couple times a minute. Heck, you could refresh faster if there isn't any nasty anti-bot checkers (those things that ask for you to input the text/numbers from a picture.
  • douchebagatrondouchebagatron Custom member title Join Date: 2003-12-20 Member: 24581Members, Constellation, Reinforced - Shadow
    or you could just email the teacher and request permission. most of the time they will just let you in.
  • [WHO]Them[WHO]Them You can call me Dave Join Date: 2002-12-11 Member: 10593Members, Constellation
    FireFox is fairly easy to write a plugin for.

    Although, just a word of advice. Since this program probably won't be thoroughly tested, I'd suggest that you not have it input any data for you (I don't remember signing up for spanish 20 times). Just refresh, monitor, and alert you when a spot opens.
  • XythXyth Avatar Join Date: 2003-11-04 Member: 22312Members
    <!--quoteo(post=1686457:date=Aug 22 2008, 03:52 PM:name=6john)--><div class='quotetop'>QUOTE(6john @ Aug 22 2008, 03:52 PM) <a href="index.php?act=findpost&pid=1686457"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->or you could just email the teacher and request permission. most of the time they will just let you in.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Already tried. Only chance is if someone drops.

    The class adding system is pretty fool-proof really. All the program really has to do is monitor the table of physics classes and when the available spots goes > 0 click the checkmark in the appropriate roll then click submit. Hopefully that will work (besides, I can add and drop classes at will until tuesday so plenty of error checking possibility).
  • ScytheScythe Join Date: 2002-01-25 Member: 46NS1 Playtester, Forum Moderators, Constellation, Reinforced - Silver
    The obvious solution is Python and WWW:Mechanize: <a href="http://wwwsearch.sourceforge.net/mechanize/" target="_blank">http://wwwsearch.sourceforge.net/mechanize/</a>

    I've used WWW:Mechanize and perl to log in to my share-trading interface and scrape off values for shares I want to monitor. Not very hard to get working.

    However, WWW:Mechanize doesn't do javascript. If your website doesn't gracefully degrade when looked at with javascript disabled, it won't work.

    --Scythe--
  • DiscoZombieDiscoZombie Join Date: 2003-08-05 Member: 18951Members
    my first suggestion would have been to take the 'easy road' and just macro it. would it be possible to use a looping macro to repeat the actions you want to take over and over again until a spot is free? or would it not work because things on the page move around and such depending on availability of classes?
  • AbraAbra Would you kindly Join Date: 2003-08-17 Member: 19870Members
    Speaking of programming, if I want to practice a little php at home, do I have to set up a server with php on my computer? I can't get php to install correctly on the apache server I just installed. Something about modules not loading in. Does anyone have a guide that works 100% to this date?

    I hope I did not derail the thread, read the OP again to stay on track <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" /> Thanks
  • KungFuDiscoMonkeyKungFuDiscoMonkey Creator of ns_altair 日本福岡県 Join Date: 2003-03-15 Member: 14555Members, NS1 Playtester, Reinforced - Onos
    edited August 2008
    <a href="http://selenium.openqa.org/" target="_blank">http://selenium.openqa.org/</a>


    It's a web testing framework but you could probably use it to write your macros.


    Abra: I typically use xampp ( <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">http://www.apachefriends.org/en/xampp.html</a> ) when I want to do php development locally since I cba setting up Apache and PHP on a non Linux environment.
  • AbraAbra Would you kindly Join Date: 2003-08-17 Member: 19870Members
    Yeah I tried that too, it threw me a nondescript error some time along the line and I lost courage in it. I will try it again some time.
Sign In or Register to comment.