Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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."
- }
Advertisement
Comments
-
- whats this for
-
- Hi Harry, it checks if any Pokemon video game on Switch is being sold in a local store.
Add Comment
Please, Sign In to add comment
Advertisement