#download_quotes.pl #Downloads portfolio quotes in .csv format from Google Finance. #Adam Russell(ac.russell@live.com) #27 February 2011 use strict; use warnings; use WWW::Scripter; my $w = new WWW::Scripter; $w->agent_alias("Mac Safari"); $w->use_plugin("JavaScript"); $w->get("https://www.google.com/accounts/Login"); sleep_rand(); $w->form_name("gaia_loginform"); $w->field("Email",GOOGLE_LOGIN); $w->field("Passwd", GOOGLE_PASSWORD); $w->current_form->trigger_event("submit"); sleep_rand(); $w->get("http://www.google.com/finance"); sleep_rand(); $w->follow_link(id=>"nav-p"); sleep_rand(); $w->follow_link(id=>"nav-pf"); sleep_rand(); $w->follow_link(id=>"download"); print $w->content; sub sleep_rand{ sleep(rand()*3); }