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~bb6fb82d/' ` | Select-Object -ExpandProperty Images | Where-Object { $_.'data-original' } | ForEach-Object { $_.'data-title' -match '\d{1,2}\s\w+\s\d{4}|\d{1,2}/\d{1,2}/\d{4}' | Out-Null $DateText = $Matches[0] $Date = [DateTime]::ParseExact($DateText.ToLowerInvariant(), [string[]]@('d MMMM yyyy', 'd\/M\/yyyy'), $DutchCulture, [System.Globalization.DateTimeStyles]'None') [PSCustomObject]@{ PSTypeName = 'UncommonSense.Parool.Article' Url = $_.'data-original' Date = $Date Title = 'Hein de Kort' Body = $_.'data-original' } } } |