Skip to content

fix: fall back to the feed description when an article cannot be scraped - #56

Merged
flthibaud merged 3 commits into
developfrom
fix/rss-description-fallback
Nov 11, 2026
Merged

flthibaud merged 3 commits into
developfrom
fix/rss-description-fallback

Conversation

@flthibaud

Copy link
Copy Markdown
Owner

When scraping the article page failed, the fallback read only item.Content. Plain RSS 2.0 fills that from <content:encoded>; a feed with only <description> leaves it empty, so the article was stored with no body and never fetched again.

  • createArticleFromItem now uses item.Description when item.Content is empty.
  • New test TestCreateArticleFromItemFallsBackToDescription: fails without the fix, passes with it.

Stacked on #54: this branch contains that PR's commit, because the test reuses the fake SQL driver it adds. Merge #54 first; this PR then shows only its own commit.

Tested with go vet and go test -race ./internal/service.

Closes #39

@flthibaud

Copy link
Copy Markdown
Owner Author

Review: OK to merge after #54.

@flthibaud
flthibaud merged commit 6378fe3 into develop Nov 11, 2026
1 check passed
@flthibaud
flthibaud deleted the fix/rss-description-fallback branch November 11, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Description-only feeds get an empty article when scraping fails

1 participant