To make curl save the results to a file we use the "-o" option as in the example below. The simplest way I have found is to save the results of the curl script in a text file and then import that file into Excel. Now that we can retrieve multiple stock quotes, we need to get them into Excel. In the example below we are retrieving quotes for Google, Yahoo and General Mills whose symbols are, "goog", "yhoo" and "gis". Yahoo makes it easy for us to retrieve several quotes at once. In this case we are retrieving the stock price for Google, whose symbol is "goog". Using the curl example below, we can retrieve a single stock price from Yahoo Finance. Yahoo makes it possible to retrieve a single stock quote via HTTP. In the Mac terminal, type "curl " and it will return the HTML for Yahoo's home page. Since you're on a Mac, there are some command line tools that can make this a straightforward effort.Ĭurl is a command line tool that allows you to retrieve web pages from the command line.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |