if we're trying to grab tweet replies, don't always use first as author
This commit is contained in:
parent
12b4bb9a52
commit
6e76fff3b8
9
hoot.go
9
hoot.go
|
@ -71,7 +71,11 @@ func hootfixer(r io.Reader, url string) string {
|
||||||
}
|
}
|
||||||
divs := tweetsel.MatchAll(root)
|
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
|
var buf strings.Builder
|
||||||
|
|
||||||
filt := htfilter.New()
|
filt := htfilter.New()
|
||||||
|
@ -90,9 +94,6 @@ func hootfixer(r io.Reader, url string) string {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
author := authormatch[1]
|
author := authormatch[1]
|
||||||
if wanted == "" {
|
|
||||||
wanted = author
|
|
||||||
}
|
|
||||||
if author != wanted {
|
if author != wanted {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue