views:

48

answers:

3

Hello, I need to extract data from a Java web application. To be specific I am looking to extract real time stock data from yahoo market tracker. can anyone please suggest any method?

A: 

You can use glorious HTTP protocol to do that. Use any language you are comfortable with (Java, C#, VB.NET, python, ruby, php) and crawl the website you are trying to get information from.

Pablo Santa Cruz
i can crawl the html code but how do i crawl for the data that is being display in the form of java app??
anubhav
+3  A: 

I'm not sure you can extract the data from Yahoo Market Tracker. Even if you can, you might not be allowed to - I can't see any obvious terms & conditions/licensing. I think (although I could be wrong, anyone got better info?) that you'll need to pay to get access to an API providing near realtime market data.

There is a HTTP-based Yahoo Stock Quote API you could use to get prices, described here. Very simple, returns a comma-separated list of attributes for one or more stock symbols, for example:

http://finance.yahoo.com/d/quotes.csv?s=MSFT&f=snd1l1yr

It might not be realtime enough, but it might be the best you can do for free.

Brabster
A: 

I need to extract data from a Java web application

From your standpoint, the fact that it is a Java Webapp or a PHP-one or static html pages doesn't change anything. It is not because Java is backing the webapp that suddenly you get a "Java-way" to extract the info.

Now in some cases there are APIs provided allowing you to interact with the data present on the website: but once again the fact that the Webapp is a Java one or not bears no importance.

NoozNooz42
but incase of normal static html site i can scrap and go through the code to take info but incase of a java app tht cannot be done.
anubhav