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:
2026-11-22 16:14:39 +01:00
parent 4131cf903e
commit 1ff78a7b31
2 changed files with 88 additions and 2 deletions

View File

@ -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