[GNC] Finance::quote YahooJSON
Kalpesh Patel
kalpesh.patel at usa.net
Sat Apr 13 09:14:46 EDT 2024
I am currently using modified YahooJSON.pm module for my needs and seems to be working from the States. It is pulling data so far. Head over to https://github.com/ka-patel/dl_quotes/blob/main/FinanceQuote/YahooJSON.pm if you are interested in its early release before Bruce can do his vetting and get it into the main line release of F::Q. Of course I am also interested in its feedback.
Keep in mind that this will introduce dependency on HTTP::CookieJar::LWP module (https://metacpan.org/pod/HTTP::CookieJar::LWP) which you can install from CPAN using your normal methods of module installation. Transcript of install below...
Microsoft Windows [Version 10.0.22631.3447]
(c) Microsoft Corporation. All rights reserved.
C:\Users\kalpesh>perl -MCPAN -e shell
Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. at C:\Strawberry\perl\vendor\lib/Term/ReadLine/readline.pm line 410.
cpan shell -- CPAN exploration and modules installation (v2.28)
Enter 'h' for help.
cpan> install HTTP::CookieJar::LWP
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Database was generated on Fri, 12 Apr 2024 11:19:08 GMT
Updating database file ... Done!
HTTP::CookieJar::LWP is up to date (0.014).
cpan> upgrade HTTP::CookieJar::LWP
All modules are up to date for HTTP::CookieJar::LWP
cpan> exit
Lockfile removed.
C:\Users\kalpesh>
-----Original Message-----
From: Bruce Schuck <bschuck at asgard-systems.com>
Sent: Thursday, April 11, 2024 10:39 PM
To: gnucash-user at gnucash.org
Subject: Re: [GNC] Finance::quote YahooJSON
On 4/11/24 17:29:59 +0000, Greg wrote:
> I'm sure the Dev's are working on it, but do we have any idea what
> happened? My log shows 401 type errors (Unauthorized) so I thought
> I'd add some diagnostics in case it helps anyone.
> Hoping for some good news (and I'm sure I'm not alone on that).
> I really appreciate this great working mail list and thanks for those
> who devlop/fix/maintain the program.
It's important to note that these APIs are likely not meant for direct access. Which is why the previous APIs that the YahooJSON.pm all became unusable at some point. This would be why you cannot find official documentation for the APIs online like you can for APIs like the AlphaVantage which limits what you can retrieve for free.
I've had less time to work on F::Q the last few months, so I'm not sure when I'll be able to either rework the module to use the v8 API or test and implement Kalpesh Patel's changes. Hopefully in the next week or so, but if someone else wants to step up and create a pull request at https://github.com/finance-quote/finance-quote that would be a great help.
On 4/11/24 12:48:09 -0600 (MDT), Terrence Branscombe wrote:
> I've just noticed that my last stock price update occurred on March
> 28. * 11:11:36 ERROR <gnc.price-quotes> [parse_quotesource_error()]
> Unrecognized Finance::Quote Error Wide character in subroutine entry
> at C:/Strawberry/perl/site/lib/Finance/Quote/Cdnfundlibrary.pm line
> 80.
It appears the format of page Cdnfundlibrary.pm uses to scrape the data from fundlibrary.com has had major changes. The Fundata.pm module
(idata.fundata.com) has also stopped working for the same reason. See Issue https://github.com/finance-quote/finance-quote/issues/366 and discussion https://github.com/finance-quote/finance-quote/discussions/364.
Unfortunately both modules are likely going to be disabled and then removed from Finance::Quote. The Fool.pm module has also recently stopped working and it will also be disabled in the next release of F::Q.
Bruce S
More information about the gnucash-user
mailing list