Function New-SMSnotification($text) { $params = @{ "user"="ssssssss"; #user ID "pass"="ssssssss"; #API Key "msg"=$text; } Invoke-WebRequest -Uri https://smsapi.free-mobile.fr/sendmsg -Method POST -Body ($params|ConvertTo-Json) -ContentType "application/json" | Out-Null } $WebResponse = Invoke-WebRequest "https://www.cashexpress.fr/produits-occasions/jeu-nintendo,61/magasin-cannes-mandelieu,233.html?marques[]=8511&tri=dt_rec-desc" $ScrappedTitles = $WebResponse.ParsedHtml.body.getElementsByTagName('a') | Where-Object {$_.href -like '*jeu-switch*'} | Select-Object -ExpandProperty nameProp $Titles = "" $LastEntry = "" $firstEntry = $true $ScrappedTitles | % { If ($_ -ne $LastEntry -And -Not $firstEntry) { $Titles += "`n" + $($_.substring(11, $_.Length -33)).replace('-',' ') } Elseif ($_ -ne $LastEntry -And $firstEntry) { $Titles += $($_.substring(11, $_.Length -33)).replace('-',' ') $firstEntry = $false } $LastEntry = $_ } If($Titles -like "*pokemon*" -Or $Titles -like "*pokémon*") { New-SMSnotification "Pokemon game available at cashexpress Mandelieu." }