Skip to content

Instantly share code, notes, and snippets.

@lukemurraynz
Last active November 1, 2017 04:04
Show Gist options
  • Save lukemurraynz/15e25668614b4777cabd3319522c92c0 to your computer and use it in GitHub Desktop.
Save lukemurraynz/15e25668614b4777cabd3319522c92c0 to your computer and use it in GitHub Desktop.
$url ='https://www.subway.co.nz/sub-of-the-day'
$response = Invoke-WebRequest -Uri $url
$Date = Get-Date
$week = $response.ParsedHtml.body.getElementsByClassName('day') | Select-Object -ExpandProperty innerText
foreach ($day in $week)
{
if ($Date.DayOfWeek -eq $day)
{
Write-Host $day
}
}
$test = $response.ParsedHtml.body.getElementsByClassName('navigation-item text-center') | Select-Object -ExpandProperty innerText
$test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment