fix(watcherguru): use watcherguru.com host
Update the Watcher.Guru base host and recognize absolute article links on the current domain while preserving RSS and HTML fallback behavior. Refs #21 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -13,7 +13,7 @@ import (
|
||||
"github.com/tradarr/backend/internal/scraper"
|
||||
)
|
||||
|
||||
const baseURL = "https://watcher.guru"
|
||||
const baseURL = "https://watcherguru.com"
|
||||
|
||||
type WatcherGuru struct {
|
||||
client *http.Client
|
||||
@ -165,7 +165,7 @@ func (w *WatcherGuru) scrapeHTML(ctx context.Context) (articles []scraper.Articl
|
||||
return
|
||||
}
|
||||
// Collect links that look like news articles
|
||||
if strings.Contains(href, "/news/") || strings.Contains(href, "watcher.guru") {
|
||||
if strings.Contains(href, "/news/") || strings.Contains(href, "watcherguru.com") {
|
||||
text := strings.TrimSpace(nodeText(n))
|
||||
if len(text) > 20 {
|
||||
url := href
|
||||
|
||||
Reference in New Issue
Block a user