Public/Get-RoosSchlikker.ps1
function Get-RoosSchlikker { $DutchCulture = New-Object -TypeName System.Globalization.CultureInfo -ArgumentList 'nl-NL' Invoke-WebRequest -Uri 'https://www.parool.nl/auteur/roos-schlikker' ` | Select-Object -ExpandProperty Links | Select-Object -ExpandProperty href | Where-Object { $_ -like '*/columns-opinie/*' -or $_ -like '*/ps/*' } | Select-Object -First 10 | ForEach-Object { $Document = ConvertTo-HtmlDocument -Text (Invoke-WebRequest -Uri $_ | Select-Object -ExcludeProperty Content) $DateText = (($Document | Select-HtmlNode -XPath '//meta[@property="article:published_time"]').GetAttributeValue("content", "") -split 'T')[0] [PSCustomObject][Ordered]@{ PSTypeName = 'UncommonSense.Parool.Article' Url = $_ Date = [DateTime]::ParseExact($DateText, 'yyyy\-MM\-dd', $DutchCulture) Title = $Document | Select-HtmlNode -CssSelector h1 | Get-HtmlNodeText Body = (($Document | Select-HtmlNode -CssSelector 'p.z3lfzo5' -All | Get-HtmlNodeText -SkipRemoveLineBreaks) -join ' ') -replace 'Reageren\? r\.schlikker@parool\.nl\.?', ''-replace 'Roos Schlikker \(1975\) is journalist en schrijfster van boeken en toneelstukken\. Elke zaterdag schrijft ze een column voor Het Parool\.\s*$', '' } } } |