mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 00:13:36 +01:00
Updated list-news.ps1
This commit is contained in:
parent
ea6ca76eda
commit
abc5a11989
@ -11,7 +11,7 @@
|
|||||||
Specifies the speed to write the text (10 ms by default)
|
Specifies the speed to write the text (10 ms by default)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-news.ps1
|
PS> ./list-news.ps1
|
||||||
<UTC> <Source: https://www.yahoo.com/news/world>
|
[UTC] [Yahoo News - Latest News & Headline - 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
|
||||||
@ -25,9 +25,9 @@ param([string]$RSS_URL = "https://news.yahoo.com/rss/world", [int]$maxLines = 24
|
|||||||
try {
|
try {
|
||||||
[xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content
|
[xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content
|
||||||
|
|
||||||
|
$title = $content.rss.channel.title
|
||||||
$URL = $content.rss.channel.link
|
$URL = $content.rss.channel.link
|
||||||
""
|
"`n [UTC] [$title - $URL]"
|
||||||
" [UTC] [SOURCE: $URL]"
|
|
||||||
|
|
||||||
[int]$count = 1
|
[int]$count = 1
|
||||||
foreach ($item in $content.rss.channel.item) {
|
foreach ($item in $content.rss.channel.item) {
|
||||||
|
Loading…
Reference in New Issue
Block a user