Make my job easier-me-do

From: Kenny J (WINGNUTKJ) 9 Jul 2013 11:15
To: koswix 4 of 34
I don't think you necessarily need to be running a web server - it's more some kind of website-grabber-macro-type-thing(me-do) you need.

In the past, I've used wget for that kind of thing, but passing in parameters to forms can be a bit of a pain in the arse. Perhaps something like this is what you're after?
https://addons.mozilla.org/en-US/firefox/addon/imacros-for-firefox/

(I've not used it, and they use the word "repetitous" in be blurb, which strikes me as a particularly egregious bit of word-mangling.)
From: Kenny J (WINGNUTKJ) 9 Jul 2013 11:17
To: ANT_THOMAS 5 of 34
That's a great chart!
From: PNCOOL 9 Jul 2013 12:12
To: koswix 6 of 34
I thought the idea of using a comparison site is that you don't have to look on multiple sites?  Seems silly if you have to check all of the comparison sites instead.
From: Ken (SHIELDSIT) 9 Jul 2013 12:24
To: koswix 7 of 34
What about something like this?  You didn't mention what OS or browser, this is for Firefox I guess.  I have it installed but haven't gotten around to using it yet.

*I noticed an IE logo on there so I guess it works with that as well.
EDITED: 9 Jul 2013 12:26 by SHIELDSIT
From: Kenny J (WINGNUTKJ) 9 Jul 2013 12:26
To: Ken (SHIELDSIT) 8 of 34
That looks rubbish. He'd be much better off using the one I suggested.
From: Ken (SHIELDSIT) 9 Jul 2013 12:30
To: Kenny J (WINGNUTKJ) 9 of 34
 %-) I blame it on lack of sleep.  Great minds and all that!  Sorry though, I just skimmed the posts and was really excited that I had something that might be useful.
From: koswix 9 Jul 2013 13:05
To: ANT_THOMAS 10 of 34
Can't install anything, these are old creaky machines with XP Pro (actually not that creaky, but the booking software only runs on XP). We do have Firefox though, if that matters.

Comparison sites are:
FHR
Skyparks
Park & Go
Secure Airport Parking
NCP
Purple Parking
Holiday Extras

From: koswix 9 Jul 2013 13:05
To: ANT_THOMAS 11 of 34
(giggle)
From: koswix 9 Jul 2013 13:06
To: Kenny J (WINGNUTKJ) 12 of 34
Ooh, that could be useful - if not for outputting to a CSV then at least save me filling in the forms each time.

EDIT: actually, seems that's *exactly* what it does. Must resist urge to play now because I'll probably break something...
EDITED: 9 Jul 2013 13:11 by KOSWIX
From: koswix 9 Jul 2013 13:07
To: PNCOOL 13 of 34
There more booking agents rather than comparison sites - each one charges a different price for the same place based on their fees etc. In the competitive world of airport parking we need to keep a daily eye on what the other parks are charging and adjust our prices accordingly.
From: koswix 9 Jul 2013 13:08
To: Ken (SHIELDSIT) 14 of 34
I think Kenny's one would be better.
From: Ken (SHIELDSIT) 9 Jul 2013 13:14
To: koswix 15 of 34
Why you racist mother fucker!
From: koswix 9 Jul 2013 16:46
To: Kenny J (WINGNUTKJ) 16 of 34
The page URLs seem to be in a pretty straightforward format. Example:

http://www.fhr-net.co.uk/airport-parking/results/?airport=13&parking-from=16%2F07%2F2013&parking-start-hour=09&parking-start-min=00&parking-to=16%2F07%2F2013&parking-end-hour=17&parking-end-min=00

So obviously you have airport, arrival day/time, departure day/time. Wonder if it'll be easier to automate it via the URL. I've had a quick play (NJ) with iMacro and I'm already out of my depth :D
From: ANT_THOMAS 9 Jul 2013 16:49
To: koswix 17 of 34
Are all the URLs like that? I haven't checked out the ones that you linked but I will have a look in a min. If they are similar a bit of wget grep and sed in a bash script would no doubt give you something usable.
From: koswix 9 Jul 2013 16:58
To: ANT_THOMAS 18 of 34
Just checking them now - NCP is a cunt, but hopefully the rest are OK. I wouldn't mind just having to check NCP.

https://prebook.ncp.co.uk/public/NCP/flow.htm?_flowExecutionKey=_cDD3E98EF-FF8C-8537-4390-E15C82AA8080_k29162C6C-4EFB-F891-8208-D3A86F669727
From: ANT_THOMAS 9 Jul 2013 17:11
To: koswix 20 of 34
FHR and purpleparking look the easiest to script.
From: koswix 9 Jul 2013 17:19
To: ANT_THOMAS 21 of 34
Yeah, the rest are bastards. Going to have to knuckle down and work out how to use this iMacro thingy.
From: Drew (X3N0PH0N) 9 Jul 2013 18:42
To: koswix 22 of 34
curl (on the unix/linux command line) can get/post to forms. A combination of curl, date and some regex should do what you want in a nice way. You could even set it as a cron job and make it do this every hour or whatever and spit the results into a csv file or something.

I realise, obviously, that you're unlikely to have a linux command line on your work machine but if you can either SSH in to a linux machine somewhere or simply have the script do the above and upload the CSV/text file somewhere where you can access it via http. Or there's always Cygwin.

I'd offer to do this for you but I absolutely lick balls at regex. I did make a script the other day to pull a random picture of the day from Wikipedia and set it as my wallpaper, which is doing roughly the same sort of thing, but that pretty much reached the outer limit of my ability with regex. I'll link it in case it's helpful but I'm sure it's fucking awfully written.

http://privatepaste.com/d0ddcea77a


From: ANT_THOMAS 9 Jul 2013 18:45
To: Drew (X3N0PH0N) 23 of 34
I've managed to get all the prices and airports from the first link with a load of greps then I stopped there :$
EDITED: 9 Jul 2013 18:50 by ANT_THOMAS