Cannot download Yahoo Price Data

Posted By: trenki2

Cannot download Yahoo Price Data - 04/18/17 08:48

Since this weekend Zorro seems to fail to download historical price data from yahoo. The following code can reproduce that:

Code:
function run()
{
	assetHistory("AAPL", FROM_YAHOO);
}



I get "Error 056: Can't download AAPL from Yahoo" (this is with Zorro 1.50.6). With Zorro Beta 1.56.3 I get "Bad - can't parse History\history.csv".

But I don't understand why that is. I have internet connection and I am able to download the prices in my browser when I follow this link:

https://ichart.finance.yahoo.com/table.csv?d=6&ignore=.csv&s=AAPL

Can someone reproduce this issue?
Posted By: Unsane

Re: Cannot download Yahoo Price Data - 04/20/17 08:27


Same error for me. No way to download from Yahoo, also with different code:


Code:
// Download historical price data from Yahoo
function main()
{
  int id = http_post("http://ichart.finance.yahoo.com/table.csv?s=AAPL&c=1980",0);
  if(!id) return;
  while(!http_status(id))
    if(!wait(100)) return; // wait for the server to reply
  int length = http_status(id);
  if(length > 0) { //transfer successful?
    string content = (string)malloc(length);
    http_result(id,content,length); // store price data in large string
    file_write("History\AAPL.csv",content,length);
    free(content); // release the string
  }
  http_free(id); //always clean up the id!
}



it hangs on "compiling...."

Any help?
Posted By: Sphin

Re: Cannot download Yahoo Price Data - 04/20/17 20:33

Maybe this will help you.
© 2024 lite-C Forums