I am trying to get yahoo options data into mysql using perl. I found modules to download stock prices, but not options data. Anyone know what would be the easiest way to do that? If I have to roll my own, what modules should I use? Thanks, CP
I don't know of any specific modules for Yahoo! Finance options, but if you want to roll your own you can usw LWP::UserAgent to download the page in question and something like HTML::TreeBuilder to parse it. If a specific option is the one you need data for, Yahoo! may even offer an RSS feed of its data in which case it's probably more robust to use something like XML::RSS to parse the feed.
Do you have a link to a page of the kind of data you'd like to get?
Perl is not always the most straightforward choice. Is there a reason why you aren't looking into using Yahoo! Pipes to pull in the data you're after and log it to file? There's nothing stopping you from using Perl to populate your MySQL database from that file at a later date.
If you still feel that Perl is the way to go, WWW::Mechanize
is a very good starting point for your screen-scraping needs.
The Finance::Quote module implements the lookup on Yahoo and a number of other sources.