Public/Get-HeinDeKort.ps1
function Get-HeinDeKort { $DutchCulture = New-Object -TypeName System.Globalization.CultureInfo -ArgumentList 'nl-NL' Invoke-WebRequest -Uri 'https://www.parool.nl/strips-en-puzzels/bekijk-hier-alle-cartoons-van-hein-de-kort~bb121f7e/' ` | Select-Object -ExpandProperty Images | Where-Object Src -Like 'https://image.parool.nl*' | Select-Object -ExpandProperty Src | ForEach-Object { $DateText = ($_ -split '/')[-1] if ($DateText -match '^\d{1,2}-\w+-\d{4}$') { $Date = [DateTime]::ParseExact($DateText, 'd-MMMM-yyyy', $DutchCulture, [System.Globalization.DateTimeStyles]'None') [PSCustomObject]@{ PSTypeName = 'UncommonSense.Parool.Article' Url = $_ Date = $Date Title = 'Hein de Kort' Body = $_ } } } } |