Merge branch 'main' into main

This commit is contained in:
lapwat authored and GitHub committed 2025-09-05 18:46:03 +02:00
commit e5d863b4d1
9 files changed
+205 -334

No files matched your search

+1 -1
View File
@@ -147,7 +147,7 @@ func NewChapterFromURL(url, linkName string, configs []*ScrapeConfig, index int,
log.Fatal(err)
}
// init progess bar
// init progress bar
var p progress
if config.Quiet == false {
p = NewProgress(links, name, config.Depth)
+2 -1
View File
@@ -115,12 +115,13 @@ func TestContentImagesOnly(t *testing.T) {
func TestSubChapters(t *testing.T) {
config0 := NewScrapeConfigQuiet()
config0.Selector = ".concrete>article>h2>a"
config1 := NewScrapeConfigQuiet()
c := NewChapterFromURL("https://12factor.net/", "", []*ScrapeConfig{config0, config1}, 0, func(index int, name string) {})
got := len(c.SubChapters())
want := 21
want := 12
if got != want {
t.Errorf("got %v, wanted %v", got, want)