Volkskrant: columns hebben geen intro
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user