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 { $Url = $_ $Document = ConvertTo-HtmlDocument -Uri $Url $DateText = $Document | Select-HtmlNode -CssSelector '.et_pb_promo_description' | ForEach-Object { $_.Elements('div') } | Get-HtmlNodeText ($DateText -split 'uur') | Where-Object { $_.Trim() } | ForEach-Object { [PSCustomObject]@{ PSTypeName = 'UncommonSense.Cinema.Film' Url = $Url Date = [DateTime]::ParseExact($_.Trim(), 'dddd d MMMM HH.mm', $DutchCulture) Title = $Document | Select-HtmlNode -CssSelector '.et_pb_promo_description h2' | Get-HtmlNodeText Body = $Document | Select-HtmlNode -CssSelector '.et_pb_text_inner' -All | Select-Object -Skip 3 -First 1 | Select-HtmlNode -CssSelector p | Get-HtmlNodeText } } } } |