<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>

<head>

<meta http-equiv="content-type"
content="text/html; charset=utf-8">
<title>
</title>
</head>
<body style="font-family:Arial;font-size:14px">

<p>
Hello,<br>

<br>

I
am
using
a
local
custom
script
to
retrieve
prices
from
the
internet.<br>

<br>

#!/bin/sh<br>

url=https://www.theglobeandmail.com/investing/markets/funds/<br>

curl
-s
"$url/$1"|<br>

./pup
-p
'a[is="barchart-alert"]
attr{quote}'|<br>

jq
-r
.lastPrice,.tradeTime<br>

<br>

Running
this
script
in
the
Bash
terminal
with
the
fund
symbol
passed
as
an
argument
will
return
something
like:<br>

<br>

/path/to/prices.sh
SYMBOL<br>

18.7920<br>

03/04/22<br>

<br>

However
I
cannot
make
KMM
use
this
script. 
I
created
a
new
source
and
set
the
options
as
this:<br>

<br>

URL: 
file:/path/to/prices.sh
%1<br>

Identifier
%1<br>

Identify
by:
Symbol<br>

Price:
(\d+(\.\d+)?)<br>

Date:
(\d{2}\
/\d{2}\
/\d{2})<br>

Date
format:
%m/%d/%y<br>

Skip
HTML...
:
CHECKED<br>

<br>

When
I
run
the
price
updater
I
get:<br>

<br>
</p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
Executing
/path/to/prices.sh
SYMBOL...</p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
Price
found:
'2.4'
(2.4)</p>
<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<span style="font-weight:600; color:#ff0000;">
Unable
to
update
price
for
SYMBOL
(no
price
or
no
date)</span></p>
<p>
<br>

Problem
1: 
it
seems
to
retrieve
the
number
of
digits
of
the
price
instead
of
the
actual
value... 
I
tried
the
price
regex
elsewhere
and
it
works. 
Not
sure
if
the
Qt
interpreter
is
causing
this
issue??<br>

Problem
2:
I
could
never
get
the
date...
Tried
pretty
much
everything
I
could
find
but
I
am
not
sure
why
its
not
working.<br>

<br>

Any
help
appreciated!<br>

Best
regards</p>
</body>
</html>