News Briefing via Google News RSS
Class-level workflow for building current-events summaries from live RSS feeds.
Why this approach
- Individual outlet RSS URLs are unreliable — guessed paths like
detik.com/rssorkompas.com/getrss/nasionalreturn 404. Go to the aggregator first. - The
mcp__fetch__fetchtool enforces robots.txt, andnews.google.comdisallows it. Usecurlin the terminal instead; it succeeds where fetch refuses. - After
3 consecutive fetch-tool failures the MCP server enters an auto-retry cooldown (60s). Don't hammer it — switch to curl immediately.
Workflow
- Build the locale feed URL:
- Headlines:
https://news.google.com/rss?hl=<lang>&gl=<country>&ceid=<country>:<lang>- Indonesia:
?hl=id&gl=ID&ceid=ID:id - US English:
?hl=en-US&gl=US&ceid=US:en
- Indonesia:
- Topic/search:
https://news.google.com/rss/search?q=<urlencoded query>&hl=..&gl=..&ceid=..
- Headlines:
- Fetch with curl and a browser UA, save to /tmp:
curl -sL --max-time 25 -A "Mozilla/5.0" "<URL>" -o /tmp/feed.xml - Parse with Python stdlib regex — use
scripts/gnews_parse.pyfrom this skill (handles unescaping,<source>extraction, trailing-outlet dedup):python3 scripts/gnews_parse.py /tmp/feed.xml 25 - Summarize grouped by section (e.g. Nasional / Ekonomi / Internasional / Hiburan), keeping headlines close to original wording.
- Reply in the user's language.
Output rules (user-checked)
- Attribute the source media for every headline — this user asks "source nya darimana?" when provenance isn't obvious. Tag each item with its outlet and list the feed URL at the end of the reply.
- Note the retrieval date/time so staleness is clear.
- Strip the trailing " - Outlet" duplicate from titles when the
<source>tag already names the outlet. - Filter junk: SEO/spam entries (gambling etc.) do slip into aggregated feeds — drop them silently.
Pitfalls
- Titles in Google News RSS are HTML-escaped — run them through
html.unescape. <source>carries attributes (<source url="...">Outlet</source>) — capture inner text, not the raw tag.- If curl also fails, fall back to fetching 2–3 major national outlets' homepages directly rather than retrying dead RSS URL guesses.