update the hooter
Ted Unangst tedu@tedunangst.com
Fri, 13 Dec 2019 17:59:53 -0500
M
go.mod
→
go.mod
@@ -7,7 +7,7 @@ github.com/mattn/go-runewidth v0.0.6
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 golang.org/x/net v0.0.0-20190620200207-3b0461eec859 humungus.tedunangst.com/r/go-sqlite3 v1.1.3 - humungus.tedunangst.com/r/webs v0.6.26 + humungus.tedunangst.com/r/webs v0.6.31 ) go 1.11
M
go.sum
→
go.sum
@@ -22,5 +22,5 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= humungus.tedunangst.com/r/go-sqlite3 v1.1.3 h1:G2N4wzDS0NbuvrZtQJhh4F+3X+s7BF8b9ga8k38geUI= humungus.tedunangst.com/r/go-sqlite3 v1.1.3/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M= -humungus.tedunangst.com/r/webs v0.6.26 h1:JgF+WhY6zvhXhRdqALPIWKTwzvwkCtD1eBB5fRzIKN8= -humungus.tedunangst.com/r/webs v0.6.26/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps= +humungus.tedunangst.com/r/webs v0.6.31 h1:xDgtESuVljephZA4GfcycwiOwJeeJYUIQbStFHceN1Y= +humungus.tedunangst.com/r/webs v0.6.31/go.mod h1:S9sXpVSbgAIa24yYhnMN0C94LKHG+2rioS+NsiDimps=
M
hoot.go
→
hoot.go
@@ -53,6 +53,9 @@ var buf strings.Builder
fmt.Fprintf(&buf, "%s\n", url) var htf htfilter.Filter + htf.Imager = func(node *html.Node) string { + return "" + } for _, div := range divs { twp := div.Parent.Parent.Parent alink := linksel.MatchFirst(twp)@@ -77,7 +80,7 @@ }
if author != wanted { continue } - text := htf.TextOnly(div) + text := htf.NodeText(div) text = strings.Replace(text, "\n", " ", -1) text = strings.Replace(text, "pic.twitter.com", "https://pic.twitter.com", -1)