nieuwsnl: foutmelding met filename

This commit is contained in:
Peter Kleiweg
2026-04-16 14:27:54 +02:00
parent 29a5dc417e
commit 84fd44f267

View File

@@ -166,7 +166,7 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
p(err)
if len(aa) == 0 {
p(fmt.Fprintln(&buf, "##META text tag ="))
_ = w(fmt.Errorf("no tag: %s", url))
_ = w(fmt.Errorf("no tag: %s\n%s", url, filename))
// geen fout, maar waarschuwing als er meer fouten zijn
fouten = append(fouten, fmt.Sprintf("no text: %s\n", url))
// dus geen return false
@@ -183,7 +183,7 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
pp, err := root.Search(`//div[@id="article-blocks"]//div[contains(@class, "paragraph-content")]`)
p(err)
if len(pp) == 0 {
_ = w(fmt.Errorf("empty: %s", url))
_ = w(fmt.Errorf("empty: %s\n%s", url, filename))
// dit is echt fout
fouten = append(fouten, fmt.Sprintf("empty: %s\n", url))