don't need replies to yoyos in hoots
Ted Unangst tedu@tedunangst.com
Thu, 31 Oct 2019 00:14:43 -0400
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
hoot.go
→
hoot.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")