Make my job easier-me-do

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
From: Drew (X3N0PH0N) 9 Jul 2013 18:47
To: ANT_THOMAS 24 of 34
:')

I hate doing anything regexy. Spend like 5 hours learning what I need to to make the thing, make the thing, then instantly forget everything I knew.
From: Kenny J (WINGNUTKJ) 9 Jul 2013 19:02
To: Drew (X3N0PH0N) 25 of 34
The secret to regexp is to always write a very detailed comment about what each section of the statement means, what it is intended to do, and why. And then give up regexp and do something less soul-destroying instead.
From: koswix 9 Jul 2013 21:06
To: Drew (X3N0PH0N) 26 of 34
Can I SSH into your machine? :D

And where the heck is PB? He'd have this done already :C
From: ANT_THOMAS 9 Jul 2013 21:16
To: koswix 27 of 34
Exactly what I thought. PB would've had it made and you sacked and him employed remotely to do your job in 15 mins each day.
From: koswix 9 Jul 2013 21:19
To: ANT_THOMAS 28 of 34
He can park cars remotely?!
From: ANT_THOMAS 9 Jul 2013 21:25
To: koswix 29 of 34
Don't underestimate his abilities! 
From: Drew (X3N0PH0N) 9 Jul 2013 23:45
To: koswix 30 of 34
From: patch10 Jul 2013 07:34
To: koswix 31 of 34
People let you park their cars? Willingly?
From: koswix10 Jul 2013 09:34
To: patch 32 of 34
Not always wilingly.
From: patch10 Jul 2013 13:01
To: koswix 33 of 34
Yeah, I think what you've actually got is a job as a carjacker.
From: koswix10 Jul 2013 16:38
To: patch 34 of 34
I'm pretty sure that would pay better.