all repos — honk @ 100819493e0326db2edbe684a05fd8f0dd7fa001

my fork of honk

don't need replies to yoyos in hoots
Ted Unangst tedu@tedunangst.com
Thu, 31 Oct 2019 00:14:43 -0400
commit

100819493e0326db2edbe684a05fd8f0dd7fa001

parent

612c076c1cbb829381df93b1c29025b9bab1e669

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M hoot.gohoot.go

@@ -31,6 +31,7 @@ )

var tweetsel = cascadia.MustCompile("p.tweet-text") var linksel = cascadia.MustCompile(".time a.tweet-timestamp") +var replyingto = cascadia.MustCompile(".ReplyingToContextBelowAuthor") var authorregex = regexp.MustCompile("twitter.com/([^/]+)") var re_hoots = regexp.MustCompile(`hoot: ?https://\S+`)

@@ -57,6 +58,10 @@ twp := div.Parent.Parent.Parent

alink := linksel.MatchFirst(twp) if alink == nil { log.Printf("missing link") + continue + } + replto := replyingto.MatchFirst(twp) + if replto != nil { continue } link := "https://twitter.com" + htfilter.GetAttr(alink, "href")