diff --git a/README.markdown b/README.markdown index 7590bcb..d119815 100644 --- a/README.markdown +++ b/README.markdown @@ -1,5 +1,11 @@ # MoneyMoney extension for Uberspace.de accounts +> [!IMPORTANT] +> I will not update this extension anymore, but [there is a +> fork](https://github.com/hatobi/moneymoney-uberspace) by +> [@hatobi](https://github.com/hatobi) which is actively maintained and has +> additional functionality. + This extension for [MoneyMoney](https://moneymoney-app.com/) retrieves the balance and transactions from [Uberspace.de](https://uberspace.de/) accounts. diff --git a/Uberspace.lua b/Uberspace.lua index dafe84f..61f9ea8 100644 --- a/Uberspace.lua +++ b/Uberspace.lua @@ -4,8 +4,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. --]] -WebBanking{version = 1.00, - url = 'https://uberspace.de/login', +WebBanking{version = 1.02, + url = 'https://dashboard.uberspace.de/login', services = {'Uberspace.de'}, description = string.format( MM.localizeText("Get balance and transactions for %s"), @@ -24,7 +24,7 @@ function InitializeSession (protocol, bankCode, username, username2, -- Login. usUsername = username - html = HTML(usConnection:get('https://uberspace.de/login')) + html = HTML(usConnection:get('https://dashboard.uberspace.de/login')) html:xpath('//input[@name="login"]'):attr('value', username) html:xpath('//input[@name="password"]'):attr('value', password) @@ -52,6 +52,11 @@ function RefreshAccount (account, since) function ParseAmount (amountString) local pattern = '(%-?%d+),(%d%d)' local euro, cent = amountString:match(pattern) + + if not euro or not cent then + return nil + end + euro = tonumber(euro) cent = tonumber(cent) / 100 if euro < 0 then @@ -62,7 +67,7 @@ function RefreshAccount (account, since) end html = HTML(usConnection:get( - 'https://uberspace.de/dashboard/accounting')) + 'https://dashboard.uberspace.de/dashboard/accounting')) tableRows = html:xpath( '//*[@id="transactions"]//tr[count(td)=3][position()