update
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user