if we're trying to grab tweet replies, don't always use first as author
Ted Unangst tedu@tedunangst.com
Fri, 27 Sep 2019 16:15:12 -0400
1 files changed,
5 insertions(+),
4 deletions(-)
jump to
M
hoot.go
→
hoot.go
@@ -71,7 +71,11 @@ return url
} divs := tweetsel.MatchAll(root) - wanted := "" + wantmatch := authorregex.FindStringSubmatch(url) + if len(wantmatch) < 2 { + log.Printf("no wanted author?") + } + wanted := wantmatch[1] var buf strings.Builder filt := htfilter.New()@@ -90,9 +94,6 @@ log.Printf("no author?")
continue } author := authormatch[1] - if wanted == "" { - wanted = author - } if author != wanted { continue }