i’m a beginner in applescript, so i think the problem is very easy to solve.
I am trying to download quotes from Yahoo finance and save the csv file, which will be provided.
So my script looks like that:
a few problems:
¢ The URL to be downloaded must come after the options (-o)
¢ The parameters must be separated by spaces
¢ The name of the executable (curl) must start with a lowercase letter
set a to "http://finance.yahoo.com/d/quotes.csv?s=IBM,DELL,DIA,AAPL&f=sl1d1t1c1ohgv&e=.csv"
set b to POSIX path of (path to downloads folder)
set c to "quotes"
do shell script "curl -o " & quoted form of (b & c & ".csv") & space & a
the site gets redirected, to follow the redirection add the -L switch, and the URL must be escaped
set a to "http://finance.yahoo.com/d/quotes.csv?s=IBM,DELL,DIA,AAPL&f=sl1d1t1c1ohgv&e=.csv"
set b to POSIX path of (path to downloads folder)
set c to "quotes"
do shell script "curl -L -o " & quoted form of (b & c & ".csv") & space & quoted form of a