[Kmymoney] Online Quotes
Allan
agander93 at gmail.com
Mon Nov 11 17:18:33 UTC 2013
On 11/11/13 15:42, Jan Ritzerfeld wrote:
> Am Montag, 11. November 2013, 12:02:52 schrieb Allan:
>> On 11/11/13 11:53, Jan Ritzerfeld wrote:
>> [...]
>>> For funds, somehow, yes. Perhaps this works for your shares, but it
>>> relies on ISINs and not WKNs. Furthermore, it assumes that the first
>>> "xx,xx EUR" is
>>> the current price, since there is no tag or text to find it:
>> That's not the case. I gave (\d+,\d\d).<span>EUR< and that matches just
>> one price entry on the site.
>
> Okay, what I meant is that there is nothing like the "Vortag" text right
> before the previous close or "Datum" text right before the date. I try HTML
> stripping first, so I need some text. But you are right, "no tag" was wrong.
>
> However, your price expressions misses the thousands separator '.', try it
> on http://www.boerse-online.de/aktie/SGS_SA-Aktie :)
> My good enough expression for the price is [\d\.]+,\d\d
>
>>> Symbol ISIN\s+(\w\w\d\d\d\d\d\d\d\d\d)
> ISIN\s+(\w{2}\d{10})
>
That was desparation, I think. As I said earlier, I'm not an expert! I
spent ages trying to get the regex's to work, only to discover that I
was still using the original URL. Doh.. So when it then worked more or
less straight away, it took me by surprise, so I didn't try any tuning.
>>> Price ([\d\.]+,\d\d) EUR
> This should fail faster if they change the site again:
I usually have a hard enough time getting things to work, rather than to
fail quicker ! <BG>
> ([\d\.]+,\d\d)\s+EUR\s+[\d\.]+,\d\d\s+EUR\s+\-?[\d\.]+,\d\d\s+\%
>
>> [...]
>
> Gruß
> Jan
>
Cheers
Allan
More information about the KMyMoney
mailing list