Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $uri = "https://covidlive.com.au/vic"
- $data = Invoke-WebRequest $uri
- $table = $data.ParsedHtml.getElementsByTagName("table") | Select -first 2 | Select-Object -Skip 1
- $Vic = ($table | select -ExpandProperty innertext)
- #Write-Host $Vic -ForegroundColor red ## Table Contents
- clear
- $Vic = $Vic.Trim("CATEGORYTOTALVARNET")
- $Vic = ($Vic).Replace('New Cases',"New:")
- $Vic = ($Vic).Replace('Cases',"Total:")
- $Vic = ($Vic).Replace(' '," | ")
- $Vic = ($Vic).Replace(':',": ")
- $Vic = $Vic.Substring(0, $Vic.IndexOf('Doses'))
- Write-Host " Cases " -ForegroundColor Black -BackgroundColor White -NoNewline
- Write-Host $Vic -ForegroundColor Green
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement