all repos — honk @ 1f3864b61572332414e3bbdd432c3358170c9493

my fork of honk

tweak hoot, less noise, log errors
Ted Unangst tedu@tedunangst.com
Tue, 03 Sep 2019 01:19:55 -0400
commit

1f3864b61572332414e3bbdd432c3358170c9493

parent

ffb6d2aca9b4ea2a8b142b21ba3eb0ddc45e45b7

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M hoot.gohoot.go

@@ -64,13 +64,17 @@ return hootfixer(r, url)

} func hootfixer(r io.Reader, url string) string { - root, _ := html.Parse(r) + root, err := html.Parse(r) + if err != nil { + log.Printf("error parsing hoot: %s", err) + return url + } divs := tweetsel.MatchAll(root) wanted := "" var buf strings.Builder - fmt.Fprintf(&buf, "hoot: %s\n", url) + fmt.Fprintf(&buf, "%s\n", url) for _, div := range divs { twp := div.Parent.Parent.Parent alink := linksel.MatchFirst(twp)