Public/Get-JipVanDenToorn.ps1
function Get-JipVanDenToorn { $DutchCulture = New-Object -TypeName System.Globalization.CultureInfo -ArgumentList 'nl-NL' $Content = Invoke-WebRequest -Uri 'https://www.volkskrant.nl/cultuur-media/jip-van-den-toorn~b2e00b99/' ` | Select-Object -ExpandProperty Content $Dates = $Content | pup '.artstyle__main--container h3 text{}' --plain | ForEach-Object { $_.Trim() } | Where-Object { $_ } | ForEach-Object { [DateTime]::ParseExact($_, "d MMMM yyyy", $DutchCulture) } $Images = $Content | pup '.artstyle__main--container img attr{src}' $NoOfItems = ($Dates.Count), ($Images.Count) | Measure-Object -Minimum | Select-Object -ExpandProperty Minimum 0..($NoOfItems - 1) | ForEach-Object { [PSCustomObject][Ordered]@{ PSTypeName = 'UncommonSense.Volkskrant.Article' Url = $Images[$_] Date = $Dates[$_] Title = 'Jip van den Toorn' Body = $Images[$_] } } } |