真正的炒股新手问问题的差距# Stock
F*s
1 楼
I used to download yahoo history data everyday with my program until this
week. My code is as follows,
URL queryStockUrl = new URL(stockQueryURL);
HttpURLConnection connection = (HttpURLConnection) queryStockUrl
.openConnection();
connection.connect();
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.
getInputStream(),"utf-8"));
Now the reader can get nothing, no error, no exception thrown. If I enter
the same stockQueryURL as above into chrome, I can download the history data
file in chrome, but my program can't.
I guess yahoo has stopped the api service, if server finds your history data
request is not from a web browser, it will offer you nothing.
Any ideas?
#1 Apr 18, 2017
-----
问题很初级,但态度和方向对了,身价必然不断提高。
week. My code is as follows,
URL queryStockUrl = new URL(stockQueryURL);
HttpURLConnection connection = (HttpURLConnection) queryStockUrl
.openConnection();
connection.connect();
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.
getInputStream(),"utf-8"));
Now the reader can get nothing, no error, no exception thrown. If I enter
the same stockQueryURL as above into chrome, I can download the history data
file in chrome, but my program can't.
I guess yahoo has stopped the api service, if server finds your history data
request is not from a web browser, it will offer you nothing.
Any ideas?
#1 Apr 18, 2017
-----
问题很初级,但态度和方向对了,身价必然不断提高。