Add '-useBasicParsing'

This commit is contained in:
Markus Fleschutz
2021-12-02 15:39:50 +01:00
parent a54455d581
commit 755f797bce
5 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
param([string]$location = "") # empty means determine automatically
try {
$Weather = (Invoke-WebRequest http://wttr.in/${location}?format=j1 -UserAgent "curl" ).Content | ConvertFrom-Json
$Weather = (Invoke-WebRequest http://wttr.in/${location}?format=j1 -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json
$Temp = $Weather.current_condition.temp_C
$Precip = $Weather.current_condition.precipMM