Last active
November 1, 2017 04:04
-
-
Save lukemurraynz/15e25668614b4777cabd3319522c92c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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