nieuwsnl: foutmelding met filename
This commit is contained in:
@@ -166,7 +166,7 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
|
|||||||
p(err)
|
p(err)
|
||||||
if len(aa) == 0 {
|
if len(aa) == 0 {
|
||||||
p(fmt.Fprintln(&buf, "##META text tag ="))
|
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
|
// geen fout, maar waarschuwing als er meer fouten zijn
|
||||||
fouten = append(fouten, fmt.Sprintf("no text: %s\n", url))
|
fouten = append(fouten, fmt.Sprintf("no text: %s\n", url))
|
||||||
// dus geen return false
|
// 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")]`)
|
pp, err := root.Search(`//div[@id="article-blocks"]//div[contains(@class, "paragraph-content")]`)
|
||||||
p(err)
|
p(err)
|
||||||
if len(pp) == 0 {
|
if len(pp) == 0 {
|
||||||
_ = w(fmt.Errorf("empty: %s", url))
|
_ = w(fmt.Errorf("empty: %s\n%s", url, filename))
|
||||||
// dit is echt fout
|
// dit is echt fout
|
||||||
fouten = append(fouten, fmt.Sprintf("empty: %s\n", url))
|
fouten = append(fouten, fmt.Sprintf("empty: %s\n", url))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user