updates
This commit is contained in:
@@ -278,8 +278,8 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
|
|||||||
|
|
||||||
specials, err := article.Search(`.//*[@data-content-type="GROUP"]`)
|
specials, err := article.Search(`.//*[@data-content-type="GROUP"]`)
|
||||||
p(err)
|
p(err)
|
||||||
for _, special := range specials {
|
for i := len(specials) - 1; i >= 0; i-- {
|
||||||
special.Remove()
|
specials[i].Remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
other, err := article.Search(`.//*[@data-content-type="PODCAST"]`)
|
other, err := article.Search(`.//*[@data-content-type="PODCAST"]`)
|
||||||
|
|||||||
@@ -313,10 +313,10 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
|
|||||||
_ = w(fmt.Errorf("no intro: %s", url))
|
_ = w(fmt.Errorf("no intro: %s", url))
|
||||||
}
|
}
|
||||||
|
|
||||||
specials, err := article.Search(`.//section//aside | .//section//figure | .//section//b`)
|
specials, err := article.Search(`.//aside | .//figure | .//figcaption | .//section//b`)
|
||||||
p(err)
|
p(err)
|
||||||
for _, special := range specials {
|
for i := len(specials) - 1; i >= 0; i-- {
|
||||||
special.Remove()
|
specials[i].Remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
ell, err = article.Search(`.//section//*[@data-article-element-index]`)
|
ell, err = article.Search(`.//section//*[@data-article-element-index]`)
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ func main() {
|
|||||||
root := doc.Root()
|
root := doc.Root()
|
||||||
divs, err := root.Search(`//div[@class="donatieformlinks"]`)
|
divs, err := root.Search(`//div[@class="donatieformlinks"]`)
|
||||||
x(err)
|
x(err)
|
||||||
for _, div := range divs {
|
for i := len(divs) - 1; i >= 0; i-- {
|
||||||
div.Remove()
|
divs[i].Remove()
|
||||||
}
|
}
|
||||||
pp, err := root.Search(`//body//p[not(.//a[contains(@href,"reportersonline.nl/support")])]`)
|
pp, err := root.Search(`//body//p[not(.//a[contains(@href,"reportersonline.nl/support")])]`)
|
||||||
x(err)
|
x(err)
|
||||||
|
|||||||
@@ -315,10 +315,10 @@ func doArticle(filename string, url string, title string, timestamp time.Time, n
|
|||||||
_ = w(fmt.Errorf("no intro: %s", url))
|
_ = w(fmt.Errorf("no intro: %s", url))
|
||||||
}
|
}
|
||||||
|
|
||||||
specials, err := article.Search(`.//section//aside | .//section//figure | .//section//b`)
|
specials, err := article.Search(`.//aside | .//figure | .//figcaption | .//section//b`)
|
||||||
p(err)
|
p(err)
|
||||||
for _, special := range specials {
|
for i := len(specials) - 1; i >= 0; i-- {
|
||||||
special.Remove()
|
specials[i].Remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
ell, err = article.Search(`.//section//*[@data-article-element-index]`)
|
ell, err = article.Search(`.//section//*[@data-article-element-index]`)
|
||||||
|
|||||||
Reference in New Issue
Block a user