cURL problem

PEcomStock

Registered
For a couple of years, I have used the following command to download historical stock price data from Yahoo's financial site.

put "http://ichart.finance.yahoo.com/table.csv?" into tURL

put "s="&symb&"&a="&openMon&"&b="&openDay&"&c="&openYr&"&d="&closeMon&"&e="&closeDay&"&f="&closeYr&"&g="&iMode&"&ignore=.csv" into tParams

put shell(merge("curl -d '[[tParams]]' [[tURL]]")) into pageText

A specific example of the tParams setting looks like…
s=NSTK&a=01&b=7&c=2005&d=01&e=11&f=2007&g=w&ignore=.csv

Until recently, these script commands worked flawlessly but in the last two months or so, I noticed a gradual deterioration. First I would get a "404 Not Found" error message in 20% of the calls. However if I repeated the call I would get the data in 80% of the repeat calls. This situation has continued to deteriorate to the point that the scripting no longer produces any data. At the same time, I can link manually to the Yahoo site for the same URL and the data is available for manual download. So it is not an issue of missing data.

I tried to get help by extending my AppleCare service only to be told that Apple does not support Unix related problems. So here is what I have found out so far. Firstly, notice that "g=w" in the example above sets the call for weekly data. This is important for what I discuss below.

As best I can figure, the problem is related to the reading of the tParams variable. When I change the shell command to…

put "curl http://ichart.finance.yahoo.com/table.csv?"&¬
"s="&symb&"&a="&openMon&"&b="&openDay&"&c="&openYr&"&d="&closeMon&"&e="&closeDay&"&f="&closeYr&"&g="&iMode&"&ignore=.csv" into cmd
put shell(cmd) into pageText

This change generates historical data but it is daily data for eight years instead of weekly data for two years. The obvious conclusion from my research to date is that the tParams settings are no longer being interpreted correctly.
I understand that Apple upgraded the LIBCURL algorithm recently and I understand the latest available version of cURL is 7.16.1 but I have exhausted my knowledge of cURL and LIBCURL at this point.
For example, how can I check what version of cURL is installed on my system (Tiger 10.4.8). I also ran across information about DarwinPorts. Do I need that if I should upgrade cURL, assuming I can even do that?
Can anybody help get me past this point?
 
i guess
Code:
curl --version
gives you something like
Code:
curl 7.13.1 (powerpc-apple-darwin8.0) libcurl/7.13.1 OpenSSL/0.9.7i zlib/1.2.3
Protocols: ftp gopher telnet dict ldap http file https ftps 
Features: IPv6 Largefile NTLM SSL libz

but with the rest i'm of no help i'm afraid..
 
Back
Top