[kmymoney4] [Bug 386462] Quote Updates quit working

Geza Giedke geza.giedke at gmail.com
Mon Nov 13 22:35:27 UTC 2017


thanks a lot, with your tips I got it to work:

either using
http://www.boerse-berlin.com/index.php/Funds?isin=%1
with

Price: Last</div><div class=".+"><span
class="currency">EUR</span><span class="nc
id_\d+_last">(\d+.\d+)</span>
Date: Date</div><div class=".+"><span class="nc
id_\d+_dateTime">(\d+/\d+/\d+)</span>
Date format: %d %m %y

or using
https://markets.ft.com/data/funds/tearsheet/summary?s=%1
with
Price: Price \(EUR\)</span><span
class="mod-ui-data-list__value">(\d+\.\d+)</span>
Date: , as of (\w+\s\d+\s\d+)\.</div>
Date Format: %m %d %y

works for me for all the funds not available in finance.google.com

Thanks again!

best regards
 Geza

On Mon, Nov 13, 2017 at 9:51 AM, Thomas Baumgart <thb at net-bembel.de> wrote:
> Geza,
>
> looking at the source of the page, I can see
>
>    Price (EUR)</span><span class="mod-ui-data-list__value">11.13</span>
>
> which needs to be caught by the regex for the price. I would use something
> like
>
>    Price.*</span><span class="mod-ui-data-list__value">([\d\.]+)</span>
>
> The date can be found here:
>
>    , as of Nov 10 2017.</div>
>
> and a corresponding regex would look like
>
>    , as of (\w+\s\d+\s\d+)\.<div>
>
> The date format then is
>
>     %m %d %y
>
> You need to activate the option "Skip HTML stripping" as parts of the regexes
> rely on the HTML tags which would otherwise not be present.
>
> Your mileage may vary as I have not tested any of these.
>
> To get to the source: Firefox has an option which is called 'View page source'
> or you can use 'wget' or 'curl' to download the page into a file on your local
> system.
>
> Hope that helps.
>
> Regards
>
> Thomas
>
>
>
> On Sonntag, 12. November 2017 21:46:47 CET Geza Giedke wrote:
>
>> thanks Jeff and Salvatore for your help; now I can use
>> finance.google.com for all stocks and most funds (both date and price
>> are imported correctly).
>> But some funds are not available there, but, for example, here:
>>
>> http://www.boerse-berlin.com/index.php/Funds?isin=LU0069450319
>>
>> or here:
>>
>> https://markets.ft.com/data/funds/tearsheet/summary?s=LU0069450319:EUR
>>
>> While I think I get KMM to access the correct page, I've not managed
>> to extract the data properly: I've tried to follow
>> http://doc.qt.io/qt-4.8/qregexp.html#1 (as linked in the KMM Online
>> help), but my construction (for Boerse Berlin) of
>> Price: LastEUR.(\d+.\d+)
>> and
>> Date: Date.(\d+\D+\d+\D+\d+)
>> does not work ("Unable to update price for LU0069450319 (no price or no
>> date)").
>>
>> I wonder if I don't understand the regexps properly or if the text
>> with "all HTML tags removed" that the parser works on looks different
>> than I think. How could I get the file that is sent to the page
>> parser?
>>
>> thanks a lot and best regards
>>  Geza
>>
>> On Sun, Nov 12, 2017 at 12:49 AM, Salvatore Dimartino
>>
>> <saldimartino at yahoo.ca> wrote:
>> > I have used the following settings:
>> >
>> > For stock quotes I created a new entry called GoogleFinance with the
>> > following parameters:
>> >
>> > URL: https://finance.google.com/finance?q=%1
>> > Symbol: %1
>> > Price: "price"\s+content="((\d+|\d{1,3}(?:[,]\d{3})).\d+)
>> > Date: "quoteTime"\s+content="(\d{4}-\d{2}-\d{2})T
>> > Date Format: %y-%m-%d
>> >
>> > Also, because almost all of my stocks are listed on the TSX in Canada, I
>> > had to modify my stocks with new tickers as follows:
>> >
>> > I changed for example for Bell Canada BCE.TO to TSE:BCE, I had to do this
>> > for all my stocks.
>> >
>> >
>> > For currency conversion I modified  Yahoo Currency with the following
>> > parameters:
>> >
>> > URL: https://finance.google.com/finance?q=%1%2
>> > Symbol: %1%2
>> > Price: "price"\s+content="((\d+|\d{1,3}(?:[,]\d{3})).\d+)
>> > Date: "quoteTime"\s+content="(\d{4}-\d{2}-\d{2})T
>> > Date Format: %y-%m-%d
>> >
>> > Also, I run KmyMoney on Windows machines, I then copied
>> > c:\user\sal\AppData\Roaming\.kde\share\config\kmymoneyrc
>> > onto all the other windows machines I have, so that I didn't have to redo
>> > this work on all my machines.
>> >
>> > Regards
>> > Sal Dimartino
>> >
>> >
>> > On Saturday, November 11, 2017, 4:41:43 PM EST, Geza Giedke
>> > <geza.giedke at gmail.com> wrote:
>> >
>> >
>> > yes, the tip to use finance.google.com for currency also works for me
>> > (KMM 4.7.2).
>> >
>> > Has somebody figured out how to also get quotes for stocks, funds etc
>> > via finance.google.com? What's the logic behind the syntax used for
>> > "symbol", "price", and "date" in the settings?
>> >
>> > regards
>> > Geza
>> >
>> > On Sun, Nov 5, 2017 at 7:18 AM, timothy <timboyle at afrihost.co.za> wrote:
>> >> The solution given in the link @ comment #15 by Thomas works fine.
>> >> Just go to Settings / Configure Kmymoney / Online Quotes and reconfigure
>> >> 'Yahoo Currency'
>> >> as per link.
>> >>
>> >>
>> >> Works fine on 4.8.1. Thanks Thomas.
>> >>
>> >> Timothy
>> >>
>> >> On Sat, 2017-11-04 at 07:20 +0000, Thomas Baumgart wrote:
>> >>> https://bugs.kde.org/show_bug.cgi?id=386462
>> >>>
>> >>> --- Comment #15 from Thomas Baumgart <tbaumgart at kde.org> ---
>> >>> Please see
>> >>> https://forum.kde.org/viewtopic.php?f=69&t=142715&p=383426#p383426
>> >>> for a possible workaround.
>
> --
>
> Regards
>
> Thomas Baumgart
>
> https://www.telegram.org/       Telegram, the better WhatsApp
> -------------------------------------------------------------
> Why do programmers wear glasses?
> Cause they don't C#.
> -------------------------------------------------------------


More information about the KMyMoney mailing list