Hi Bruce,
nup, I checked it again:

$ locate YahooJSON.pm
/usr/share/perl5/site_perl/Finance/Quote/YahooJSON.pm
/usr/share/perl5/site_perl/Finance/Quote/CurrencyRates/YahooJSON.pm

$ grep -i version /usr/share/perl5/site_perl/Finance/Quote/YahooJSON.pm
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
use vars qw($VERSION $YIND_URL_HEAD $YIND_URL_TAIL);
our $VERSION = '1.61'; # VERSION


$ DEBUG=1 ./stockdump.pl yahoojson ^GDAXI

### AlphaVantage->new args : {}

### [Fri Apr 19 23:46:21 2024]    cookie_jar : bless( {
###                                                     COOKIES => {
###                                                                  
'www.yahoo.com' => {
###                                                                             
          '/' => {
###                                                                             
                   RRC => [
###                                                                             
                            0,
###                                                                             
                            'st=1713563181248.6&cnt=1',
###                                                                             
                            undef,
###                                                                             
                            1,
###                                                                             
                            undef,
###                                                                             
                            undef,
###                                                                             
                            1,
###                                                                             
                            {
###                                                                             
                              HttpOnly => undef
###                                                                             
                            }
###                                                                             
                          ]
###                                                                             
                 }
###                                                                             
        }
###                                                                }
###                                                   }, 'HTTP::Cookies' )
### [Fri Apr 19 23:46:21 2024]         crumb : 
'{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid
 Cookie"}}}'
$VAR1 = {
          '^GDAXIerrormsg' => 'Error retrieving quote for ^GDAXI. Attempt to 
fetch the URL 
https://query2.finance.yahoo.com/v11/finance/quoteSummary/?symbols=^GDAXI&crumb={"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid
 Cookie"}}}&modules=price,summaryDetail,defaultKeyStatistics resulted in HTTP 
response 401 (Unauthorized)',
          '^GDAXIsymbol' => '^GDAXI',
          '^GDAXIsuccess' => 0

$ cat ./stockdump.pl
#!/usr/bin/perl -w
use strict;
use lib '../lib';
use Finance::Quote;
use Data::Dumper;
use Getopt::Std;
use DateTime;

# A very very simple script.  Takes a source and a symbol, looks it up,
# and dumps it to STDOUT.  Useful for debugging.

my %options = ('c' => '');

getopts('c:',\%options);

die "Usage: $0 [-c currency] source symbol\n" unless (defined $ARGV[1]);

my $q = Finance::Quote->new;

if ($options{'c'}) {
        $q->set_currency($options{'c'});
}

 my %quotes = $q->fetch(@ARGV);

------

I run Archlinux on my machines and both show the same error: 'invalid cookie'.

Best regards
Klaus

On Fri, 19 Apr 2024 09:23:16 -0700
Bruce Schuck <bsch...@asgard-systems.com> wrote:

> Adam Griffis also noted that it is working from Germany.
>
> I suspect that you set PERL5LIB to use
> $HOME/.cpan/build/Finance-Quote-1.60-0/ instead of 1.61?
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to