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"


Get-DeepLtranslation translating straight from your powershell

I was doing my dutch course homework today, and i found it a bit tedious to use browser for translation. This + the fact that i want to write myself some dutch-polish quiz, so i can memorize words better led me to write this tiny function.

The DeepL translator website can be found here

This is a tiny function that would just use the ‘word/1 sentence’ mode. It worked today, not sure if it will be working in later months/years. This was made in really quick/dirty way, as i still need to write my homework today 😉 I wrote it in 15 minutes, so don’t expect fireworks, it does what it does, it translates 😉 You can use different languages using variables fromLang and toLang.

function get-DeepLtranslation ($sentence, $fromLang, $toLang)
#Languages available: PL,EN,NL,ES,IT,FR
$url = ""
$call = '{"jsonrpc":"2.0","method":"LMT_handle_jobs","params":{"jobs":[{"kind":"default","raw_en_sentence":"'+$sentence+'"}],"lang":{"user_preferred_langs":["EN","PL","NL"],"source_lang_user_selected":"'+$fromLang+'","target_lang":"'+$toLang+'"},"priority":-1},"id":15}'
$bytes = [System.Text.Encoding]::ASCII.GetBytes($call)
$web = [System.Net.WebRequest]::Create($url)
$web.Method = "POST"
$web.ContentLength = $bytes.Length
$web.ContentType = "application/x-www-form-urlencoded"
$stream = $web.GetRequestStream()
$reader = New-Object System.IO.Streamreader -ArgumentList $web.GetResponse().GetResponseStream()
$answer = ($reader.ReadToEnd()|ConvertFrom-Json).result.translations.beams | select -ExpandProperty 'postprocessed_sentence'
return $answer

I am not sure why it does not work with the polish single word. IT does translate it though on the website(blue)


When put in sentence that will work.


What i also saw, is that sometimes calls to are being made.

I don’t have time right now to dig into this, but for some words you can utilize those:

calls. Behind it’s this :

So you can get the translation like this:

(Invoke-WebRequest -Uri ‘

That would have to be still converted to proper polish.

I think that something is going wrong when trying to translate words that have polish ‘ogonki’, and char encoding has something to do with it.