From 90fc23212bddc8629b3b7af3d956aab563c842d5 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 6 Feb 2022 03:35:27 -0500 Subject: [PATCH] maybe don't loop infinitely --- hoot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoot.go b/hoot.go index 5f2e2e0..03029e1 100644 --- a/hoot.go +++ b/hoot.go @@ -88,7 +88,7 @@ func hootextractor(r io.Reader, url string, seen map[string]bool) string { if author != wanted { continue } - for img := imgsel.MatchFirst(twp); img != nil; imgsel.MatchFirst(twp) { + for _, img := range imgsel.MatchAll(twp) { img.Parent.RemoveChild(img) div.AppendChild(img) }