Re: reliability problem with Finance::QuoteHist::Yahoo



Ted wrote:
I have been able to get this package to work sometimes. However,
invariably it fails on me part way through my script, after
downloading data for from one to four ticker symbols. The error is:

Can't use an undefined value as an ARRAY reference at C:/Perl/site/lib/
Finance/QuoteHist/Generic.pm line 863.

I have no information about how an undefined value is being passed
deep into the code of a package I didn't write. I took a quick look
into Generic.pm and yahoo.pm, but found no enlightenment so far
(there's a lot of code there).

Sometimes it arises when quotes() is executed, and at other times, it
occurs when dividends() is executed.

The script I am using is appended below. There isn't anything special
about it. Much of it I copied from example code in the documentation
provided for the two finance packages I'm trying. About all I did was
merge two example scripts, and attempt to get the historical quote
data for one symbol at a time. So far, I have historical quote data
for four stocks. There are over 7000 that I need to retrieve:
obviously not something that is manageable manually downloading each
individually.

Neither Finance::QuoteHist::Generic nor Finance::QuoteHist::Yahoo
(which is derived from the former) say anything about error handling,
or provide a way to test whether or not data was successfully
downloaded.

Any assistance would be greatly appreciated.

Thanks

Ted


Without even looking at your code my guess is that Yahoo! is not particularly
pleased about providing an ad-sponsored service to web-scrapers. Part of the
reason that free services change their page format is to block people from
doing this. Yahoo! changes their page format fairly frequently and I'm willing
to bet that their web programmers have access to CPAN. If you need 7000 quotes
then its pretty clearly not for your personal portfolio. Maybe time for your
company to invest in a quote service.

--S
** Posted from http://www.teranews.com **
.



Relevant Pages

  • Re: CSVDE Password Limitations - [WP]
    ... If I create and disable a user manually this script when I run it enables it ... I am importing users into AD from CSV file and ran into password assigning ... ' delimited by a quote followed by a comma. ...
    (microsoft.public.windows.server.active_directory)
  • Re: CSVDE Password Limitations - [WP]
    ... Your script was greata!!!! ... I am importing users into AD from CSV file and ran into password ... ' delimited by a quote followed by a comma. ...
    (microsoft.public.windows.server.active_directory)
  • Re: CSVDE Password Limitations - [WP]
    ... If I create and disable a user manually this script when I run it enables it ... I am importing users into AD from CSV file and ran into password assigning ... ' delimited by a quote followed by a comma. ...
    (microsoft.public.windows.server.active_directory)
  • Re: CSVDE Password Limitations - [WP]
    ... Your script was greata!!!! ... I am importing users into AD from CSV file and ran into password assigning ... ' delimited by a quote followed by a comma. ...
    (microsoft.public.windows.server.active_directory)
  • reliability problem with Finance::QuoteHist::Yahoo
    ... I have been able to get this package to work sometimes. ... downloading data for from one to four ticker symbols. ... The script I am using is appended below. ... foreach $row ) { ...
    (comp.lang.perl.misc)