all repos — honk @ 1858832c4a4a08b3e66aefc7169f90be22385df2

my fork of honk

revise hoot match to exclude translations.
from coelacanth
Ted Unangst tedu@tedunangst.com
Sun, 07 Aug 2022 16:02:58 -0400
commit

1858832c4a4a08b3e66aefc7169f90be22385df2

parent

afa9e15634d5397ffd0c309f469a610cb5acb6d5

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M hoot.gohoot.go

@@ -28,7 +28,7 @@ "golang.org/x/net/html"

"humungus.tedunangst.com/r/webs/htfilter" ) -var tweetsel = cascadia.MustCompile("div[itemProp=articleBody]") +var tweetsel = cascadia.MustCompile("div[data-testid=tweetText]") var linksel = cascadia.MustCompile("a time") var replyingto = cascadia.MustCompile(".ReplyingToContextBelowAuthor") var imgsel = cascadia.MustCompile("div[data-testid=tweetPhoto] img")

@@ -66,7 +66,7 @@

divs := tweetsel.MatchAll(root) for i, div := range divs { { - twp := div.Parent.Parent.Parent + twp := div.Parent.Parent.Parent.Parent.Parent link := url alink := linksel.MatchFirst(twp) if alink == nil {

@@ -100,7 +100,7 @@ fmt.Fprintf(&buf, "> @%s: %s\n", author, text)

continue } - twp := div.Parent.Parent.Parent + twp := div.Parent.Parent.Parent.Parent.Parent link := url alink := linksel.MatchFirst(twp) if alink == nil {