Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-13-2014, 09:47 PM #1
- Join Date
- May 2014
- Thanked 0 Times in 0 Posts
Script to monitor website and click button if it appears
First of all - my experience with programming is at a minimum, so please stop me if I'm diving to deep here...
I wanna make a script or program to monitor a certain http://bit.ly/1mSSoh5 and click a button if it appears.
It a site for getting a student accommodation, and they have a "first who sees it gets it"-policy which means that a
apartment could come up any time, and the fastest to click it, gets it.
Is there a way to do this? The tricky part is that the program would have to scan for the word "tvistevägen" and when that comes up, click that word (which also is a link" and then click the button "anmäl intresse" which would register me for the apartment.
Is this even doable?
Otherwise I hope you realized it early, and hopefully you're not reading this, so I'm wasting your time...
05-13-2014, 09:58 PM #2
- Join Date
- Jun 2007
- Thanked 619 Times in 599 Posts
very do-able, and not terribly complicated. look into greasemonkey and/or tampermonkey, and just userscripts in general for these sorts of things.
i won't do it for you because it sound like it could likely be against the terms of the website (not that i can read them), and because being descriptive it more helpful to other trying to do the same thing.
you need two userscripts, one for each page you need to perform actions on.
you can google for info/code about how to accomplish each step, each should be no more than a line or two of js.
on the main listing page user script
-schedule a reload in 30 seconds
-find the word "tvistevägen" in one of the document.links
-if present, call .click() on the <A> tag that matched, taking you to the detail page
on the detail page user script
- .click() the link/button with the specific ID that performs the action you want (it should be the same id for each apartment page), registering the apartment.
Last edited by rnd me; 05-13-2014 at 10:05 PM.Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com