feat(summary): send complete articles within user budget (#39)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
// Package cnbcbusiness reads only CNBC's configured Business RSS feed.
|
||||
// Article URLs are returned as metadata and are never fetched.
|
||||
// Scrape returns metadata only; Enrich loads the bounded article pool separately.
|
||||
package cnbcbusiness
|
||||
|
||||
import (
|
||||
@ -130,7 +130,7 @@ func (c *CNBCBusiness) Scrape(ctx context.Context, _ []string) (articles []scrap
|
||||
break
|
||||
}
|
||||
}
|
||||
articles = append(articles, scraper.Article{Title: title, URL: canonical, Content: plainText(item.Description), PublishedAt: published})
|
||||
articles = append(articles, scraper.Article{ContentState: scraper.ContentIncomplete, Title: title, URL: canonical, Content: plainText(item.Description), PublishedAt: published})
|
||||
}
|
||||
return articles, nil
|
||||
}
|
||||
|
||||
11
backend/internal/scraper/cnbcbusiness/content.go
Normal file
11
backend/internal/scraper/cnbcbusiness/content.go
Normal file
@ -0,0 +1,11 @@
|
||||
package cnbcbusiness
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/tradarr/backend/internal/scraper"
|
||||
"github.com/tradarr/backend/internal/scraper/articlecontent"
|
||||
)
|
||||
|
||||
func (c *CNBCBusiness) Enrich(ctx context.Context, articles []scraper.Article) ([]scraper.Article, error) {
|
||||
return articlecontent.Enrich(ctx, c.client, "cnbc_business", articles)
|
||||
}
|
||||
Reference in New Issue
Block a user