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 poe.trade 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 = @(
'http://poe.trade/search/yugakakekutusa',
'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"
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s