Skip to content

Commit 7b4197d

Browse files
committed
ci: fix tests
1 parent 3100688 commit 7b4197d

File tree

3 files changed

+93
-311
lines changed

3 files changed

+93
-311
lines changed

book/scraper_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,13 @@ func TestContentImagesOnly(t *testing.T) {
115115
func TestSubChapters(t *testing.T) {
116116

117117
config0 := NewScrapeConfigQuiet()
118+
config0.Selector = ".concrete>article>h2>a"
118119
config1 := NewScrapeConfigQuiet()
119120

120121
c := NewChapterFromURL("https://12factor.net/", "", []*ScrapeConfig{config0, config1}, 0, func(index int, name string) {})
121122

122123
got := len(c.SubChapters())
123-
want := 21
124+
want := 12
124125

125126
if got != want {
126127
t.Errorf("got %v, wanted %v", got, want)

go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ go 1.23.0
55
toolchain go1.24.5
66

77
require (
8-
github.com/JohannesKaufmann/html-to-markdown/v2 v2.3.3
9-
github.com/JohannesKaufmann/html-to-markdown/v2 v2.3.3
8+
github.com/JohannesKaufmann/html-to-markdown v1.6.0
109
github.com/bmaupin/go-epub v1.1.0
11-
github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819
10+
github.com/elazarl/goproxy v1.7.2
1211
github.com/go-shiori/go-readability v0.0.0-20250217085726-9f5bf5ca7612
1312
github.com/jedib0t/go-pretty/v6 v6.6.7
1413
github.com/mmcdole/gofeed v1.3.0
@@ -26,10 +25,10 @@ require (
2625
github.com/andybalholm/cascadia v1.3.3 // indirect
2726
github.com/antchfx/htmlquery v1.3.4 // indirect
2827
github.com/antchfx/xmlquery v1.4.4 // indirect
29-
github.com/antchfx/xpath v1.3.3 // indirect
28+
github.com/antchfx/xpath v1.3.4 // indirect
3029
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
3130
github.com/bits-and-blooms/bitset v1.22.0 // indirect
32-
github.com/gabriel-vasile/mimetype v1.4.1 // indirect
31+
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
3332
github.com/go-shiori/dom v0.0.0-20230515143342-73569d674e1c // indirect
3433
github.com/gobwas/glob v0.2.3 // indirect
3534
github.com/gofrs/uuid v4.4.0+incompatible // indirect
@@ -41,19 +40,20 @@ require (
4140
github.com/kennygrant/sanitize v1.2.4 // indirect
4241
github.com/mattn/go-isatty v0.0.20 // indirect
4342
github.com/mattn/go-runewidth v0.0.16 // indirect
44-
github.com/mmcdole/goxpp v1.1.1-0.20240225020742-a0c311522b23 // indirect
43+
github.com/mmcdole/goxpp v1.1.1 // indirect
4544
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4645
github.com/modern-go/reflect2 v1.0.2 // indirect
47-
github.com/nlnwa/whatwg-url v0.6.1 // indirect
46+
github.com/nlnwa/whatwg-url v0.6.2 // indirect
4847
github.com/rivo/uniseg v0.4.7 // indirect
4948
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect
50-
github.com/sirupsen/logrus v1.9.0 // indirect
49+
github.com/sebdah/goldie/v2 v2.5.5 // indirect
5150
github.com/spf13/pflag v1.0.6 // indirect
5251
github.com/temoto/robotstxt v1.1.2 // indirect
5352
github.com/vincent-petithory/dataurl v1.0.0 // indirect
54-
golang.org/x/net v0.39.0 // indirect
55-
golang.org/x/sys v0.32.0 // indirect
56-
golang.org/x/text v0.24.0 // indirect
53+
github.com/yuin/goldmark v1.7.11 // indirect
54+
golang.org/x/net v0.41.0 // indirect
55+
golang.org/x/sys v0.33.0 // indirect
56+
golang.org/x/text v0.26.0 // indirect
5757
google.golang.org/appengine v1.6.8 // indirect
5858
google.golang.org/protobuf v1.36.6 // indirect
5959
)

0 commit comments

Comments
 (0)