[GNC] Revisiting Quotes (Bruce Schuck)
Kalpesh Patel
kalpesh.patel at usa.net
Tue May 30 09:32:28 EDT 2023
Bruce -
The Python3 yahoo_fin module code installed on my instance looks at "https://query1.finance.yahoo.com/v8/finance/chart/" URI while Python2.7 yahoofinance module code installed on my instance looks at "https://query1.finance.yahoo.com/v7/finance/download/{i}" URI with routine to grab the crumbs. Reading things around I came across https://metacpan.org/dist/Finance-QuoteHist/source/lib/Finance/QuoteHist/Yahoo.pm which I believe has the best explanation and the corresponding Perl code to extract them dynamically.
I have a web scraping perl module that provides EOD price only. Would there be any interest in reviewing it? That is what I put together for myself as an interim F::Q that does not rely on any yahoo API.
-----Original Message-----
From: Bruce Schuck <bschuck at asgard-systems.com>
Sent: Tuesday, May 30, 2023 12:24 AM
To: Colin Arndt <colinfarndt at gmail.com>
Cc: gnucash-user at gnucash.org
Subject: Re: [GNC] Revisiting Quotes (Bruce Schuck)
On 5/29/23 7:41 PM, Colin Arndt wrote:
> Thanks for all your work to keep up this past month. The latest 1.56
> update fixes price retrieval within GnuCash.
>> This means modules will need to be rewritten to parse the HTML.
>> Doable, but not as simple as parsing JSON.
> There is an excellent python module ‘yfinance’ which does exactly this
> - scrapes price data from Yahoo!’s website. This might not be of any
> use because it’s written in python instead of Perl, but nonetheless
> wanted to make sure you’re aware of it.
Colin,
While I would confirm if the Python source is grabbing the normal web page or the API calls we use(d) in F::Q, this did give me the idea to search CPAN. I found the module Yahoo::Finance which may also be a good start and possibly does the heavy lifting already.
Thanks a bunch for the info!
Bruce S.
More information about the gnucash-user
mailing list