This is a patch against the upstream source's Finance-Quote-1.16/lib/Finance/Quote.pm , like that of the previous message, but updated for 1.16-1 .
38a39 > use Finance::Quote::Yahoo::Base qw/yahoo_request/; 45c46 < $YAHOO_CURRENCY_URL = "http://uk.finance.yahoo.com/currency/convert?amt=1&submit=Convert&"; --- > $YAHOO_CURRENCY_URL = "http://finance.yahoo.com/d"; 242,256c243,252 < my $ua = $this->user_agent; < < my $data = $ua->request(GET "${YAHOO_CURRENCY_URL}from=$from&to=$to")->content; < my $te = HTML::TableExtract->new( headers => ['Symbol', 'Bid', 'Ask'] ); < $te->parse(decode_utf8($data)); # The web page returns utf8 content which gives < # a warning when parsing $data in HTML::Parser < < # Make sure there's a table to parse. < return undef unless ($te->tables); < < my $row = ($te->rows())[0]; < my ($exchange_rate) = $$row[1]; < $exchange_rate =~ s/,// ; # solve a bug when conversion rate < # involves thousands. yahoo inserts < # a comma when thousands occur --- > my $symbol = "$from$to=X"; > my @symbols = ($symbol); > my %info = yahoo_request($this,$YAHOO_CURRENCY_URL,\...@symbols); > return undef unless $info{$symbol,"success"}; > > my $exchange_rate = $info{$symbol,"last"}; > > $exchange_rate =~ s/,// ; # solve a bug when conversion rate > # involves thousands. yahoo inserts > # a comma when thousands occur