mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-15 15:03:17 +00:00
fix: Fix assignment mismatch in ExtractContentWithCSS function
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user