Advertisement
Combreal

trackVGRelease.ps1

Sep 20th, 2022 (edited)
1,056
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function New-SMSnotification($text) {
  2.     $params = @{
  3.         "user"="ssssssss"; #user ID
  4.         "pass"="ssssssss"; #API Key
  5.         "msg"=$text;
  6.     }
  7.    
  8.     Invoke-WebRequest -Uri https://smsapi.free-mobile.fr/sendmsg -Method POST -Body ($params|ConvertTo-Json) -ContentType "application/json" | Out-Null
  9. }
  10.  
  11. $WebResponse = Invoke-WebRequest "https://www.cashexpress.fr/produits-occasions/jeu-nintendo,61/magasin-cannes-mandelieu,233.html?marques[]=8511&tri=dt_rec-desc"
  12. $ScrappedTitles = $WebResponse.ParsedHtml.body.getElementsByTagName('a') | Where-Object {$_.href -like '*jeu-switch*'} | Select-Object -ExpandProperty nameProp
  13.  
  14. $Titles = ""
  15. $LastEntry = ""
  16. $firstEntry = $true
  17. $ScrappedTitles | % {
  18.     If ($_ -ne $LastEntry -And -Not $firstEntry) {
  19.         $Titles += "`n" + $($_.substring(11, $_.Length -33)).replace('-',' ')
  20.     }
  21.     Elseif ($_ -ne $LastEntry -And $firstEntry) {
  22.         $Titles += $($_.substring(11, $_.Length -33)).replace('-',' ')
  23.         $firstEntry = $false
  24.     }
  25.     $LastEntry = $_
  26. }
  27.  
  28. If($Titles -like "*pokemon*" -Or $Titles -like "*pokรฉmon*") {
  29.     New-SMSnotification "Pokemon game available at cashexpress Mandelieu."
  30. }
  31.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement