Public/Get-FilmtheaterHilversum.ps1
function Get-FilmtheaterHilversum { Invoke-WebRequest -Uri https://www.filmtheaterhilversum.nl/films/ ` | Select-Object -ExpandProperty Links | Where-Object { $_.HRef } | Select-Object -ExpandProperty HRef | Where-Object { $_ -match '/films/\d+' } | ForEach-Object { $Url = "https://www.filmtheaterhilversum.nl$($_)" $Document = ConvertTo-HtmlDocument -Uri $Url $Intro = ($Document | Select-HtmlNode -CssSelector '.film__synopsis__intro' | ForEach-Object { [System.Web.HttpUtility]::HtmlDecode($_.InnerText).Trim() } | Where-Object { $_ }) -join "`n" $Description = ($Document | Select-HtmlNode -CssSelector '.film__content__details' | ForEach-Object { [System.Web.HttpUtility]::HtmlDecode($_.GetDirectInnerText()).Trim() } | Where-Object { $_ }) -join "`n" [PSCustomObject]@{ PSTypeName = 'UncommonSense.Cinema.Film' Url = $Url Date = (Get-Date) # FIXME Title = ($Document | Select-HtmlNode -CssSelector 'h1.featured__title' | ForEach-Object { [System.Web.HttpUtility]::HtmlDecode($_.InnerText).Trim() } | Where-Object { $_}) -join ' ' Body = (@($Intro, $Description) | Where-Object { $_ }) -join "`n`n" } } } |