Menu

Yahoo Europe not returning date

2007-05-08
2013-06-03
  • Jonathan Knight

    Jonathan Knight - 2007-05-08

    Yahoo Europe is not returning a date, so the date field in the F::Q data is blank. Is it possible to default this to todays date ?

     
    • Jan

      Jan - 2007-09-13

      Hi,

      Yahoo Europe changed its URL (don't know if this is crucial) and changed the csv field query syntax (this definitely _is_ crucial). To fix this, in <path_to_Finance_perl_lib>/Quote/Yahoo edit the files Base.pm and Europe.pm.

      In Europe.pm change

      $YAHOO_EUROPE_URL = ("http://uk.finance.yahoo.com/d/quotes.csv");
      to
      $YAHOO_EUROPE_URL = ("http://uk.old.finance.yahoo.com/d/quotes.csv");

      In Base.pm change
      1.
      @FIELDS = qw/symbol name last date time net p_change volume bid ask
                   close open day_range year_range eps pe div_date div div_yield
               cap ex_div avg_vol currency/;
      to

      @FIELDS = qw/symbol name last time date net p_change volume bid ask
                   close open day_range year_range eps pe div_date div div_yield
               cap ex_div avg_vol currency/;

      (switch "time" and "date")

      2.
      @FIELD_ENCODING = qw/s n l1 d1 t1 c1 p2 v b a p o m w e r r1 d y j1 q a2 c4/;

      @FIELD_ENCODING = qw/s n l1 t1 c1 p2 v b a p o m w e r r1 d y j1 q a2 c4/;

      (remove "d1" as date _and_ time comes with "t1")

      Regards,

        Jan

       
    • Ben Marsh

      Ben Marsh - 2008-06-06

      Dear Jan,

      Thanks for your post.  I will look into incorporating this in the distribution of Finance::Quote.

      Regards,

      Ben Marsh

       
    • Erik Colson

      Erik Colson - 2008-08-31

      Dear Ben,

      Did you actually look at this problem ?
      I hate it to have to hack every installation of finance::quote I do ;)

      Thanks
      --
      Erik

       

Log in to post a comment.