[GNC] Finance::quote YahooJSON
Kalpesh Patel
kalpesh.patel at usa.net
Sun Apr 14 11:25:47 EDT 2024
If anyone needs the Currency version of it, head over to https://github.com/ka-patel/dl_quotes/tree/main/FinanceQuote/CurrencyRates ... It has slightly different requirements -- so follow instructions on README there; instead of HTTP::CookieJar::LWP you will need HTTP::Cookies module -- to easily merge it into main line F::Q code base.
-----Original Message-----
From: Emmitt J Kraft <emmitt at kraftfam.org>
Sent: Saturday, April 13, 2024 3:26 PM
To: gnucash-user at gnucash.org
Subject: Re: [GNC] Finance::quote YahooJSON
Excellent!! I can confirm that these two pieces have fixed the new yahoo JSON authentication requirement (cookies and crumbs!) and Finance Quote is retrieving all the latest price quotes for me! I had already updated my FinanceQuote module to 1.59, so doing 1) install HTTP::CookieJar::LWP and 2) replacing YahooJSON.pm in the C:\Strawberry\perl\site\lib\Finance\Quote directory with yours from your dl_quotes github was the magic ticket for me!
You apparently foresaw this happening since your dl_quotes github was started 9 months ago. You're a true visionary and a life-saver!!
I can also confirm that changing from yahoo finances v11 query2 URL to
v8 (and v7, v6, v10 etc) did not resolve the issue since it was always a new yahoo finance authentication requirement.
Thanks again! Emmitt
On 4/13/2024 8:14 AM, Kalpesh Patel wrote:
> 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
>
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at 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.
More information about the gnucash-user
mailing list