Skip to content

Instantly share code, notes, and snippets.

@nicksterx
Last active August 22, 2017 21:14
Show Gist options
  • Select an option

  • Save nicksterx/310077a991368c21708125ca18db01da to your computer and use it in GitHub Desktop.

Select an option

Save nicksterx/310077a991368c21708125ca18db01da to your computer and use it in GitHub Desktop.
Check to see if snes class is available on gamestops website.
$title = (curl www.gamestop.com/collection/snes-classic).ParsedHtml.head.innerText
$count = 1;
$lastRan = Get-Date -Format g
Write-Host Attempt $count - $title - $lastRan
DO{
start-sleep -Seconds 300
$title = (curl www.gamestop.com/collection/snes-classic).ParsedHtml.head.innerText
$lastRan = Get-Date -Format g
$count++
Write-Host Attempt $count - $title - $lastRan
} While ($title -eq "Gamestop.com - Temporarily Down for Maintenance")
start www.gamestop.com/collection/snes-classic
DO{
Write-Host
$title = (curl www.gamestop.com/collection/snes-classic).ParsedHtml.head.innerText
$count++
Write-Host !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $count - $title
} While ($title -ne "Gamestop.com - Temporarily Down for Maintenance")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment