I am a developer new to Windows 8 Metro. I’m trying to develop an app that can pull data asynchronously from the HTML of a specific website. In fact, I just need the data from a few divs in that particular webpage. I’m using the JS template for the Grid App in VS2012. Is there any possible way to do this? Any help or pointers here would be much appreciated!
Note: The website I’m trying to extract the data from allows such crawling, so no worries about the legality there. It’s just that they don’t provide any API to retrieve the data.
You can use the HttpClient class to retrieve content from a URL.
After you’ve retrieved the content as a string, you can then use regular expressions to parse the data you intend to use.
EDIT: Just realised this is a Javascript question. You can make use of WinJS.xhr which is a wrapper for XMLHttpRequest.
Quick Start: http://msdn.microsoft.com/en-us/library/windows/apps/Hh868282%28v=win.10%29.aspx
Reference: http://msdn.microsoft.com/en-us/library/windows/apps/br229787.aspx