[GNC] weird price for LU0067412154

Peter West pbw at pbw.id.au
Thu Mar 18 00:22:23 EDT 2021


Here’s the RE.

m[<td class="line heading">NAV<span class="heading"><br />([0-9]{2}/[0-9]{2}/[0-9]{4})</span>.*([A-Z]{3}).([0-9\.]+).*>([0-9\.\-]+)]

There is no trailing modifier, so this has to be a single line in the html.

So it will start looking with the initial literal string including NAV and ending with the '<br />’ which shows in pretty-print as ‘<br>’. That won’t match if it’s actually like that, of course. What is the full raw html text of the <td class=“line heading”> in which the $5356.02 appears?


—
pbw at ehealth.id.au
“…you refuse to come to me that you may have life.”

> On 18 Mar 2021, at 11:57 am, Peter West <pbw at pbw.id.au> wrote:
> 
> The pretty-printed elements from the Developer menu won’t be matched by the RE. Can you see the raw html?
> 
> Peter
>> pbw at ehealth.id.au
> “…an hour is coming when all who are in the tombs will hear his voice and come out…”
> 
>> On 18 Mar 2021, at 10:09 am, Geoff <cleanoutmyshed at gmail.com> wrote:
>> 
>> This looks like a problem with Finance Quote's MStaruk.pm module.  Did Morningstar change their web site recently?
>> 
>> Testing the recent Finance Quote v1.50 release candidate, without using any GnuCash code, I get the same results.
>> 
>> See attached screenshot - I think the problem lies with the long regular expression on line 160.  It contains a couple of "greedy" matches that are probably causing a match on the last decimal number (Share Class Size) instead of the first (NAV).
>> 
>> Geoff
>> =====
>> 
>> On 18/03/2021 6:48 am, Andrea Borgia wrote:
>>> Il 17/03/21 20:32, Derek Atkins ha scritto:
>>>> The screenshot didn't make it through the email, most likely because you
>>>> sent it as an embedded image in HTML instead of as a text with attachment.
>>> Yes and I never had any issues before. Weird.
>>> My apologies.
>>>>> gnc-fq-dump morningstarch LU0067412154
>>>> When I run this, I get:
>>>> 
>>>> gnc-fq-dump morningstarch LU0067412154
>>>> Finance::Quote fields Gnucash uses:
>>>>     symbol: LU0067412154         <=== required
>>>>       date: 03/17/2021           <=== recommended
>>>>   currency: USD                  <=== required
>>>>       last: 2150.31              <=\
>>>>        nav: 2150.31              <=== one of these
>>>>      price: 2150.31              <=/
>>>>   timezone:                      <=== optional
>>>> 
>>>> 
>>>>> gnc-fq-dump mstaruk LU0067412154
>>>> This gives me different results:
>>>> 
>>>> gnc-fq-dump mstaruk LU0067412154
>>>> Finance::Quote fields Gnucash uses:
>>>>     symbol: LU0067412154         <=== required
>>>>       date: 03/17/2021           <=== recommended
>>>>   currency: USD                  <=== required
>>>>       last: 5356.02              <=\
>>>>        nav: 5356.02              <=== one of these
>>>>      price: 5356.02              <=/
>>>>   timezone:                      <=== optional
>>>> 
>>>> So I would say the issue is upstream, possibly with the quote sources.
>>> Hmm, the UK site of MorningStar gives a totally reasonable value.
>>> That's why I asked.
>>> Pity, the screenshot of the website is missing as well.
>>> _______________________________________________
>>> 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
>>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>>> -----
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>> <gnc_fq_mstaruk.jpg>_______________________________________________
>> 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
>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 
> _______________________________________________
> 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
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> 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