D****r 发帖数: 309 | 1 我是newbie,请教各位大侠,如何用jQuery/javascript fetch google stock data?
---------------------------
---------------
why no response?
thanks in advance... |
e*****t 发帖数: 1005 | 2 wrong board.
【在 D****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我是newbie,请教各位大侠,如何用jQuery/javascript fetch google stock data? : --------------------------- : : : ---------------
|
D****r 发帖数: 309 | 3 where is the correct one then? |
D****r 发帖数: 309 | 4 really disappointing...
191 clicks, no one is willingly to share a hint. |
l*****a 发帖数: 14598 | 5 你把URL扔到address bar看看返回来的是什么数据
看看结果是JSON data吗?
【在 D****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我是newbie,请教各位大侠,如何用jQuery/javascript fetch google stock data? : --------------------------- : : : ---------------
|
r****y 发帖数: 26819 | 6 output=csv
呵呵
【在 l*****a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 你把URL扔到address bar看看返回来的是什么数据 : 看看结果是JSON data吗?
|
D****r 发帖数: 309 | 7 Thanks!
The .csv is what I want. But I don't know how to parse the result and print
out to e.g. screen.... |
r****y 发帖数: 26819 | 8 http://www.bennadel.com/blog/1504-Ask-Ben-Parsing-CSV-Strings-W
t-Exec-Regular-Expression-Command.htm
print
【在 D****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Thanks! : The .csv is what I want. But I don't know how to parse the result and print : out to e.g. screen....
|
s***o 发帖数: 2191 | 9 This is a cross domain request, and it returns csv instead of json. (I guess
) jsonp won't work with csv format out of the box.
You can find the corresponding API that returns data in jsonp format, or if
that's not available, you can get data on server side, parse it and put the
parsed result on your web page with whatever format you prefer.
print
【在 D****r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Thanks! : The .csv is what I want. But I don't know how to parse the result and print : out to e.g. screen....
|
l*****a 发帖数: 14598 | 10 I think the difficulty he met is that he can't get the csv strings directly
instead of he don't know how to parse csv strings
【在 r****y 的大作中提到】![](/moin_static193/solenoid/img/up.png) : http://www.bennadel.com/blog/1504-Ask-Ben-Parsing-CSV-Strings-W : t-Exec-Regular-Expression-Command.htm : : print
|
|
|
r****y 发帖数: 26819 | 11 嗯,csv可以save as,但没法再script里做。用json的例子:
http://jsfiddle.net/grimreaper01/jVWwu/
directly
【在 l*****a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I think the difficulty he met is that he can't get the csv strings directly : instead of he don't know how to parse csv strings
|
l*****a 发帖数: 14598 | 12 还是要求google提供output=json最方便
【在 r****y 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 嗯,csv可以save as,但没法再script里做。用json的例子: : http://jsfiddle.net/grimreaper01/jVWwu/ : : directly
|
D****r 发帖数: 309 | 13 终于找到组织了。。。
What I want to get is the stock historical data, could it be "output=json?"
I tried, seems not working.
If I change the url to "http://www.google.com/finance/info?nfotype=infoquoteall&q=AIG&callback=?"
as @rodney said: http://jsfiddle.net/grimreaper01/jVWwu/, then It can be processed.
But this is not historical data... |
g**e 发帖数: 6127 | 14 为啥要用google的数据,yahoo的不是挺好
【在 l*****a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 还是要求google提供output=json最方便
|
r****y 发帖数: 26819 | 15 看了一下
google finance api关掉了吧,不清楚
【在 l*****a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 还是要求google提供output=json最方便
|
D****r 发帖数: 309 | 16 yahoo有支持JSON的historical data?
【在 g**e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 为啥要用google的数据,yahoo的不是挺好
|
l*****a 发帖数: 14598 | |
D****r 发帖数: 309 | 18 thanks! it works for me too.
that's really cool,
only...
yahoo data is not always uptodate as google, esp. the foreign stocks.
【在 l*****a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 看起来这个work : http://designbye.wordpress.com/2011/03/01/access-yql-finance-da
|