Private/Get-VolkskrantCartoon.ps1
function Get-VolkskrantCartoon { param ( [Parameter(Mandatory)] [string]$Uri, [Parameter(Mandatory)] [string]$Title ) $DutchCulture = New-Object -TypeName System.Globalization.CultureInfo -ArgumentList 'nl-NL' Invoke-WebRequest -Uri $Uri | Select-Object -ExpandProperty Images | Where-Object src -Like 'https://image.volkskrant.nl/*' | Where-Object src -Match '.*/\d+-\w+-\d{4}$' | Select-Object -ExpandProperty src | ForEach-Object { $DateText = ($_ -split '/')[-1] $Date = [DateTime]::ParseExact($DateText, 'd-MMMM-yyyy', $DutchCulture) [PSCustomObject][Ordered]@{ PSTypeName = 'UncommonSense.Volkskrant.Article' Url = $_ Date = $Date Title = $Title Body = $_ } } } |