how to get the values from a web site that uses AJAX functionality

B

buran

Dear ASP.NET Developers,

I would like to screen scape some values from a web site in a regular
interval. I had managed to do this by the code snippet given below, but the
web site now uses AJAX functionality to display the values.

string requestUrl =
"http://www.buranburanburan.com/buranburan/buran.aspx";
Uri address = new Uri(requestUrl);

HttpWebRequest request = (HttpWebRequest)
WebRequest.Create(address);
HttpWebResponse response = (HttpWebResponse)
request.GetResponse();
StreamReader stream = new
StreamReader(response.GetResponseStream());
string source = stream.ReadToEnd();
source = source.Substring(source.IndexOf("USDTRL", 0), 40);
source = source.Substring(34, 6);

The web site now uses AJAX rather than directly outputting the values:

<script type="text/javascript">
/*function SendQuoteTableAjax()
{
var dt = new Date();
httpRequest.open( "GET",
"./somewebpage.aspx?callajax=true&dt="+dt.getTime(), true);
httpRequest.send(null);
setTimeout("SendTableQuoteAjax()",20000);
}
setTimeout("SendQuoteTableAjax()",20000);*/
</script>

How can I get the values now?

Thanks in advance,

buran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top