Fix list-exchange-rates.ps1

This commit is contained in:
Markus Fleschutz 2021-08-03 18:56:41 +02:00
parent 6c8cbf3c27
commit 53bd5ec1cc

View File

@ -46,7 +46,7 @@ try {
" Source: http://www.floatrates.com" " Source: http://www.floatrates.com"
"" ""
[xml]$ExchangeRates = (invoke-webRequest -uri "http://www.floatrates.com/daily/$($currency).xml").Content [xml]$ExchangeRates = (invoke-webRequest -uri "http://www.floatrates.com/daily/$($currency).xml" -userAgent "curl" -useBasicParsing).Content
foreach($Row in $ExchangeRates.channel.item) { foreach($Row in $ExchangeRates.channel.item) {
[string]$Name = $Row.targetName [string]$Name = $Row.targetName
[float]$Value = $Row.exchangeRate [float]$Value = $Row.exchangeRate