Public/Get-FilmhuisVeenendaal.ps1
function Get-FilmhuisVeenendaal { $DutchCulture = [CultureInfo]::GetCultureInfo('nl-NL') Invoke-WebRequest -Uri https://www.filmhuisveenendaal.nl/ ` | Select-Object -ExpandProperty Links | Select-Object -ExpandProperty Href | Where-Object { $_ -match 'https://www.filmhuisveenendaal.nl/.+' } | ForEach-Object { $_ -replace '/$', '' } | Where-Object { $_ -notlike '*/vereniging' } | Where-Object { $_ -notlike '*/leden' } | Where-Object { $_ -notlike '*/nieuwsbrief' } | Where-Object { $_ -notlike '*/vrijwilliger-worden' } | Where-Object { $_ -notlike '*/bezoekersinformatie' } | ForEach-Object { $_.ToLowerInvariant() } | Select-Object -Unique | ForEach-Object { $Content = Invoke-WebRequest -Uri $_ | Select-Object -ExpandProperty Content $DateText = ($Content | pup '.et_pb_promo_description:nth-of-type(1) p text{}' --plain) -join '' if (-not $DateText) { # Sometimes, there is more than one viewing date $DateText = ($Content | pup '.et_pb_promo_description:nth-of-type(1) b text{}' --plain) } ($DateText -split 'uur') | Where-Object { $_.Trim() } | ForEach-Object { [PSCustomObject]@{ PSTypeName = 'UncommonSense.Cinema.Film' Url = $_ Date = [DateTime]::ParseExact($_.Trim(), 'dddd d MMMM HH.mm', $DutchCulture) Title = ($Content | pup '.et_pb_column_1 h2 text{}' --plain) Body = ($Content | pup '.et_pb_text_3 .et_pb_text_inner text{}' --plain | Where-Object { $_ }) -join ' ' } } } } |