Subject: | Finance::Quote::ZA - broken due to website changes |
Date: | Sat, 31 Aug 2013 18:10:27 +0200 |
To: | bug-Finance-Quote [...] rt.cpan.org |
From: | Peter Faller <pgfaller [...] gmail.com> |
Hi -
There have been changes on the www.sharenet.co.za site that
Finance::Quote::ZA uses for price information. Enabling the debug code
shows ...
[debug]: got this far...
[debug]: (table_state)HTML::TableExtract::Table=HASH(0xa791cfc)
[debug]: Closing Prices (29/08/2013) | | |
[debug]: | | |
[debug]: Close | 2262 | |
[debug]: | | |
[debug]: High | 2280 | |
[debug]: | | |
[debug]: Low | 2250 | |
[debug]: | | |
[debug]: Volume | 270967 | |
[debug]: | | |
[debug]: P/E Ratio | 26.32 | |
[debug]: | | |
.. and the code needs modification thus to accomodate the empty rows:
diff /tmp/original.pm /usr/share/perl5/Finance/Quote/ZA.pm
132c132
< $info{$symbol, "last"} = $rows[1][1];
---
Show quoted text
> $info{$symbol, "last"} = $rows[2][1];
137c137
< $info{$symbol, "high"} = $rows[2][1];
---
Show quoted text > $info{$symbol, "high"} = $rows[4][1];
141c141
< $info{$symbol, "low"} = $rows[3][1];
---
Show quoted text > $info{$symbol, "low"} = $rows[6][1];
Regards
Peter Faller