This commit is contained in:
Peter Kleiweg
2026-06-05 16:05:46 +02:00
parent efa301cc4a
commit a76fa21584
12 changed files with 645 additions and 38 deletions

View File

@@ -280,6 +280,7 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
}
header := headers[0]
isVideo := false
tags := make([]string, 0)
ell, err := header.Search(`.//*[@data-test-id="article-label"]`)
p(err)
@@ -291,6 +292,9 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
if s != "" && s != "Nieuws" {
tags = append(tags, s)
}
if strings.ToLower(s) == "video" {
isVideo = true
}
}
pars := make([]string, 0)
@@ -344,7 +348,9 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
}
}
if !found {
_ = w(fmt.Errorf("no text, skipping: %s", url))
if !isVideo {
_ = w(fmt.Errorf("no text, skipping: %s", url))
}
fp, err := os.Create(filename + ".skip")
p(fp.WriteString(url + "\n"))
p(err)