如何从Java Web应用程序中提取数据?

发布于 2024-09-14 22:06:43 字数 69 浏览 2 评论 0原文

我需要从 Java Web 应用程序中提取数据。具体来说,我希望从雅虎市场跟踪器中提取实时股票数据。有人可以建议任何方法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无法回应 2024-09-21 22:06:43

我不确定您是否可以从雅虎市场跟踪器中提取数据。即使你可以,你也可能不被允许 - 我看不到任何明显的条款&条件/许可。我认为(虽然我可能是错的,但有人有更好的信息吗?)您需要付费才能访问提供近实时市场数据的 API。

您可以使用基于 HTTP 的 Yahoo 股票报价 API 来获取价格,此处描述< /a>.非常简单,返回一个或多个股票代码的以逗号分隔的属性列表,例如:

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

它可能不够实时,但这可能是你能做的最好的免费。

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.

月牙弯弯 2024-09-21 22:06:43

您可以使用光荣的 HTTP 协议来做到这一点。使用您熟悉的任何语言(Java、C#、VB.NET、python、ruby、php)并抓取您要从中获取信息的网站。

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.

抱猫软卧 2024-09-21 22:06:43

我需要从 Java Web 中提取数据
应用

从您的角度来看,它是一个 Java Web 应用程序或 PHP-one 或静态 html 页面这一事实不会改变任何东西。并不是因为 Java 支持 Web 应用程序,您突然就获得了提取信息的“Java 方式”。

现在,在某些情况下,提供的 API 允许您与网站上的数据进行交互:但 Web 应用程序是否是 Java 应用程序这一事实并不重要。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文