Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to get the values from a web site that uses AJAX functionality

Reply
Thread Tools

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

 
 
buran
Guest
Posts: n/a
 
      02-15-2009
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

 
Reply With Quote
 
 
 
 
buran
Guest
Posts: n/a
 
      02-16-2009
Hi, isn't there anyone to help me or to point me to somewhere?


"buran" <> wrote in message
news:...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
List of free web site design, web site backgrounds, web site layoutsresources cyber HTML 0 12-21-2007 03:47 PM
List of free web site design, web site backgrounds, web site layoutsweb sites cyber HTML 1 12-19-2007 09:07 AM
"ASP.NET AJAX-Enabled Web Site" or "AJAX Control Toolkit Web Site"? mark4asp ASP .Net 1 03-24-2007 06:06 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57