From ea12ad631c74246da2911c6fa854c54015f60236 Mon Sep 17 00:00:00 2001 From: "Arik Jones (aider)" Date: Sat, 14 Sep 2024 14:54:04 -0500 Subject: [PATCH] fix: Fix assignment mismatch in ExtractContentWithCSS function --- internal/scraper/scraper.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/scraper/scraper.go b/internal/scraper/scraper.go index 1d90673..4ae1f06 100644 --- a/internal/scraper/scraper.go +++ b/internal/scraper/scraper.go @@ -250,7 +250,10 @@ func ExtractContentWithCSS(content, selector string) (string, error) { return "", fmt.Errorf("error parsing HTML: %v", err) } - selectedContent := doc.Find(selector).Html() + selectedContent, err := doc.Find(selector).Html() + if err != nil { + return "", fmt.Errorf("error extracting content with CSS selector: %v", err) + } if selectedContent == "" { return "", fmt.Errorf("no content found with CSS selector: %s", selector) }