Jai Vaughan
2011-Dec-22 03:41 UTC
[R] RHTMLForms / Scrape data from website that needs a parameter in-putted
Hi, I'm trying to get a list of addresses from http://tatts.com/racing/outletsearch based on a list of postcodes (zip codes) and states. For example, I'm looking for State = 'Northern Territory' and Postcode = '0800'. The list I'm working off is about 500 long so I was hoping to find a way to script this in R. I regularly us readLines and the XML library to scrape data but had no luck finding a solution using these methods. After some serious Googling it seems to me RHTMLForms is the way to go. I have gone through every example I can find and tried to apply it to my problem but with no success. I would be happy to provide more detail about the errors I'm getting if that would help, the problem is I have been getting quite a variation of errors and I'm not sure what would be appropriate to post. I don't know if I'm missing something simple or whether I'm trying to wrong approach. I would greatly appreciate any direction anyone may be able to give me. I'm using R 2.13.1 on Windows 7 6.1. Cheers, Jai Vaughan [[alternative HTML version deleted]]