mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-23 18:38:19 +02:00
Updated list-news.ps1 and watch-news.ps1
This commit is contained in:
parent
6b2abf3103
commit
9fd63dbb30
@ -12,9 +12,9 @@
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-news.ps1
|
PS> ./list-news.ps1
|
||||||
|
|
||||||
UTC Yahoo News - Latest News & Headlines - https://www.yahoo.com/news/world
|
UTC HEADLINES (by https://www.yahoo.com/news/world
|
||||||
--- -----------------------------------------------------------------------
|
--- ---------
|
||||||
❇️ 09:15 Deadly Mediterranean wildfires kill more than 40
|
09:15 • Deadly Mediterranean wildfires kill more than 40
|
||||||
...
|
...
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
|
@ -31,7 +31,7 @@ function PrintLatestHeadlines([xml]$content, [string]$latestTimestamp, [string]$
|
|||||||
foreach($item in $items) {
|
foreach($item in $items) {
|
||||||
$pubDate = $item.pubDate
|
$pubDate = $item.pubDate
|
||||||
if ($pubDate -le $latestTimestamp) { continue }
|
if ($pubDate -le $latestTimestamp) { continue }
|
||||||
$title = $item.title
|
$title = $item.title -replace "â","'"
|
||||||
$time = $pubDate.Substring(11, 5)
|
$time = $pubDate.Substring(11, 5)
|
||||||
Write-Host "$time $title$icon"
|
Write-Host "$time $title$icon"
|
||||||
Start-Sleep -milliseconds 500
|
Start-Sleep -milliseconds 500
|
||||||
|
Loading…
Reference in New Issue
Block a user