Wed Apr 17 11:58:37 EDT 2024, Kalpesh Patel writes:

Is this happening on Windows 10 with Strawberry perl?

There is one other user is having problem getting secure cookies on Windows 10 which is what this appears to be as well. It is related to
some Perl's SSL package being broken or not installed correctly but
haven't been able to pinpoint it.

Wednesday, April 17, 2024 5:44 AM, Richard Ullger writes:

yahoojson and yahooweb are not working for me either in v1.60 and they didn't work in 1.59_01.
WRT "yahooweb", Yahoo made changes to their finance pages. The URL used for the web scrape, aside from some formatting changes that break the module, also returns a huge amount of header information (over 16k bytes when I fetch it using curl). While I have a fix for the large amount of header information, work needs to be done to change the parsing to retrieve the data (see https://github.com/finance-quote/finance-quote/issues/377).

WRT "yahoo_json" (which now allows it to be called "yahoojson"), some users are reporting the same. Turning debug on within Perl has so far indicated that not all the required cookies are being returned.

From using "curl" the following cookies should be retrieved:

AS=v=...

A1=d=...

A3=d=...

A1S=d=...

From one user, it looks like only the "AS=v=..." cookie is returned.

Those having the same issue as Richard, please execute "curl --head https://login.yahoo.com"; or "curl --include https://login.yahoo.com"; and look for the "set-cookie:" lines in the header.

Here is a way to test outside of GnuCash on Linux and Mac. Utilizes cached package source left behind from install using "cpan".

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

# If you have installed 1.60 more than once (perhaps different
# library paths), 1.60-0 may be 1.60-1 or 1.60-2, or ...
cd $HOME/.cpan/build/Finance-Quote-1.60-0
export PERL5LIB=$HOME/.cpan/build/Finance-Quote-1.60-0/lib:$PERL5LIB
./Examples/stockdump.pl yahoo_json AAPL
$VAR1 = {
          'AAPLlow' => '168.27',
          'AAPLopen' => '171.71',
          'AAPLsymbol' => 'AAPL',
          'AAPLeps' => '6.42',
          'AAPLvolume' => 58572152,
          'AAPLisodate' => '2024-04-16',
          'AAPLname' => 'AAPL (Apple Inc.)',
          'AAPLdiv_yield' => '0.5501187',
          'AAPLcurrency' => 'USD',
          'AAPLdate' => '04/16/2024',
          'AAPLhigh' => '173.755',
          'AAPLtype' => 'EQUITY',
          'AAPLpe' => '26.457943',
          'AAPLlast' => '169.86',
          'AAPLyear_range' => '       162.8 - 199.62',
          'AAPLexchange' => 'NasdaqGS',
          'AAPLsuccess' => 1,
          'AAPLclose' => '172.69',
          'AAPLmethod' => 'yahoo_json'
        };

You can output debugging information by adding "DEBUG=1" before executing the stockdump.pl script.

$ DEBUG=1 ./Examples/stockdump.pl yahoo_json AAPL

For those still having an issue with v1.60, my guess is that you will find the "AS=" cookie in the debug output.

As Kalpesh theorized, the issue could lie within another Perl module/package.

On Wed, 17 Apr 2024 08:23:38 +0200, Adam Griffis writes:

> However, YahooJSON is still giving me the same error. Is an API key
> required for YahooJSON now?

No, Yahoo is not requiring an API Key.

Bruce S
_______________________________________________
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