mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-19 03:01:15 +01:00
Update list-weather.ps1
This commit is contained in:
parent
037bc52bdf
commit
ed2527dd13
@ -79,7 +79,9 @@ function GetWindDir { param([string]$Text)
|
||||
}
|
||||
|
||||
try {
|
||||
Write-Progress "⏳ Loading data from http://wttr.in ..."
|
||||
$Weather = (Invoke-WebRequest -URI http://wttr.in/${Location}?format=j1 -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json
|
||||
Write-Progress -completed "."
|
||||
$Area = $Weather.nearest_area.areaName.value
|
||||
$Region = $Weather.nearest_area.region.value
|
||||
$Country = $Weather.nearest_area.country.value
|
||||
|
Loading…
Reference in New Issue
Block a user