Volkskrant: columns hebben geen intro

This commit is contained in:
Peter Kleiweg
2026-06-09 18:37:19 +02:00
parent a9f9e17acf
commit d7adc17d4b

View File

@@ -280,6 +280,7 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
header := headers[0]
isOpinie := false
isColumn := false
tags := make([]string, 0)
ell, err := header.Search(`.//*[@data-test-id="article-label"]`)
p(err)
@@ -291,8 +292,10 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
if s != "" && s != "Nieuws" {
tags = append(tags, s)
}
if strings.ToLower(s) == "opinie" {
if s1 := strings.ToLower(s); s1 == "opinie" {
isOpinie = true
} else if s1 == "column" {
isColumn = true
}
}
@@ -308,7 +311,7 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
found = true
}
}
if !found && !isOpinie {
if !found && !isOpinie && !isColumn {
_ = w(fmt.Errorf("no intro: %s", url))
}