Skip to content

Instantly share code, notes, and snippets.

@kamack38
Last active October 2, 2021 16:38
Show Gist options
  • Select an option

  • Save kamack38/d50cdcb855e532b10258445bd8cef285 to your computer and use it in GitHub Desktop.

Select an option

Save kamack38/d50cdcb855e532b10258445bd8cef285 to your computer and use it in GitHub Desktop.
Loli Paradise Show Products In Stock
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# $errorActionPreference = 'Stop'
# if (Test-Path $PSScriptRoot/update_vars.ps1) { . $PSScriptRoot/update_vars.ps1 }
# else { Write-Error 'Var file doesn''t exists' -Category ResourceUnavailable}
$darkChibiHoodie = [PSCustomObject]@{
Name = '"Dark Chibi" Hoodie'
Link = 'https://loliparadise.com/kolekcja/ubrania/dark-chibi-hoodie'
}
$madcollenHoodie = [PSCustomObject]@{
Name = '"madcollen" Hoodie'
Link = 'https://loliparadise.com/kolekcja/ubrania/madcollen-hoodie'
}
$rektvasakiHoodie = [PSCustomObject]@{
Name = '"REKTVASAKI" Hoodie'
Link = 'https://loliparadise.com/kolekcja/ubrania/rektvasaki-hoodie'
}
$darkChibiTShirt = [PSCustomObject]@{
Name = '"Dark Chibi" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/dark-chibi-t-shirt'
}
$madcollenTShirt = [PSCustomObject]@{
Name = '"madcollen" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/madcollen-t-shirt'
}
$rektvasakiTShirt = [PSCustomObject]@{
Name = '"REKTVASAKI" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/rektvasaki-t-shirt'
}
$xodymbTShirt = [PSCustomObject]@{
Name = '"xodymb" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/xodymb-t-shirt'
}
$xodymbWhiteTShirt = [PSCustomObject]@{
Name = '"xodymb" White T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/xodymb-white-t-shirt'
}
$AngelDustTShirt = [PSCustomObject]@{
Name = '"Angel Dust" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/angel-dust-t-shirt'
}
$StickxrTShirt = [PSCustomObject]@{
Name = '"Stickxr" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/stickxr-t-shirt'
}
$ShideMagicalGirlTShirt = [PSCustomObject]@{
Name = '"Shide Magical Girl" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/shide-magical-girl-t-shirt'
}
$StickxrShawtyTShirt = [PSCustomObject]@{
Name = '"Stickxr Shawty" T-Shirt'
Link = 'https://loliparadise.com/kolekcja/ubrania/stickxr-shawty-t-shirt'
}
$webs = $darkChibiHoodie, $madcollenHoodie, $rektvasakiHoodie, $darkChibiTShirt, $madcollenTShirt, $rektvasakiTShirt, $xodymbTShirt, $xodymbWhiteTShirt, $AngelDustTShirt, $StickxrTShirt, $ShideMagicalGirlTShirt, $StickxrShawtyTShirt
for (($i = 0), ($j = 0); -not($j -eq 1 -and $i -eq $webs.count);$i++) {
if ($i -ge $webs.count) {$i = 0; Write-Host '------------------------------------' -Foreground Yellow}
$web = Invoke-WebRequest -Uri $webs[$i].Link
$btn = $web.parsedhtml.body.GetElementsByClassName("shb-add-to-cart-button-text")[0]
if ($btn.textContent -match 'Wariant wyprzedany') {
Write-Host "["$webs[$i].Name"]" -Foreground Blue -NoNewLine
Write-Host ' [Product Unavailable]' -Foreground Red
}
else {
Write-Host "["$webs[$i].Name"]" -Foreground Blue -NoNewLine
Write-Host ' [Product Available!]' -Foreground Green -Background White
explorer.exe $webs[$i].Link
$j = 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment