[kmymoney] [Bug 396797] Online web source "KMyMoney Currency" does not support price pairs without decimal

Ralf Habacker bugzilla_noreply at kde.org
Wed Jul 25 09:44:55 BST 2018


https://bugs.kde.org/show_bug.cgi?id=396797

--- Comment #9 from Ralf Habacker <ralf.habacker at freenet.de> ---
(In reply to shizuma from comment #7)
> Think I've fixed (for me) your price date issue:
> 
> price: '1[ a-zA-Z]+=</span><br */?> *([\d\.]+)\s'
> date:  '>updated \d+:\d+:\d+\([A-Z]+\) (\d{1,2}/\d{2}/\d{4})'
>updated \d+:\d+:\d+\([A-Z]+\) (\d{1,2}/\d{2}/\d{4})
comparing to the original, which is
 updated\s\d+:\d+:\d+\(\w+\)\s+(\d{1,2}/\d{2}/\d{4})

\s is equal to ' ', so I only see a real difference in using [A-Z]+ instead of
\w+, which limits the allowed characters 

  from http://doc.qt.io/archives/qt-4.8/qregexp.html
     \w - Matches a word character (QChar::isLetterOrNumber(), QChar::isMark(),
or '_').

and ' ' instead of \s+, which limits the number of spaces to exactly one. 

> Fetching URL https://fx-rate.net/BTC/CAD...
> Price found: '10863' (10,863)
> Date found: 'Tue Jul 24 2018'
> Price for BTC updated (id E000003)
> Fetching URL https://fx-rate.net/ETH/CAD...
> Price found: '627.3' (627.3)
> Date found: 'Tue Jul 24 2018'
> Price for ETH updated (id E000005)

Can you provide the raw html code for the date e.g. the part between
'updated...</span>' from the page source you got ?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list