mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 21:20:51 +01:00
Add parameter -useBasicParsing
This commit is contained in:
parent
67cb8ac816
commit
50221e502f
@ -8,7 +8,7 @@
|
||||
param($RSS_URL = "https://yahoo.com/news/rss/world", [int]$MaxCount = 20)
|
||||
|
||||
try {
|
||||
[xml]$Content = (invoke-webRequest -URI $RSS_URL).Content
|
||||
[xml]$Content = (invoke-webRequest -URI $RSS_URL -useBasicParsing).Content
|
||||
"`n🌍 $($Content.rss.channel.title) 🌏"
|
||||
|
||||
[int]$Count = 0
|
||||
|
@ -8,7 +8,7 @@
|
||||
param($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
|
||||
|
||||
$Area = $Weather.nearest_area.areaName.value
|
||||
$Region = $Weather.nearest_area.region.value
|
||||
|
Loading…
Reference in New Issue
Block a user