monitoring path of exile prices

I know this has nothing to do with VMware, or powershell … i wrote this to check some price on path of exile, and get notification … (beep), when item is affordable. Script does not need explanation i guess since it’s just few lines. Link are the link you would get after creating a search criteria for item.

Not the best way, but it does the job.

While (0 -ne 1 ) {
$links = @(
'other link',

foreach ($link in $links){
$data = (Invoke-WebRequest -Uri $link)
$items = $data.ParsedHtml.getElementsByTagName('tbody') |? {$_.outerHTML -match "id=item-container"}
foreach ($item in $items)
$res = ([regex]::Matches((($item.outerHTML[0..350] -join '') -split '>')[0],'data-(name|buyout|ign)="[^"]*"')).value
''| select @{n='Item';e={$res[0].split('=')[1]}}, @{n='price';e={$res[2].split('=')[1]}}, @{n='seller';e={$res[1].split('=')[1]}}, @{n='Link';e={$link}}
if($res) {[console]::Beep(500,200)}
Start-Sleep -Seconds 1
Start-Sleep -Seconds 30
write-host "next run"