Conversation
…s 403) The calendar page the app scraped is behind a Cloudflare bot challenge and returns HTTP 403 to server-side requests (cf-mitigated: challenge), so the app never reached its parsing step and always rendered the error state. Merriam-Webster's official WOTD RSS feed is not subject to that rule and returns 200 from the same edge. It exposes a <merriam:shortdef> element carrying a short definition, which suits the display and matches what the calendar scrape was after. - html.star -> xpath.star; calendar URL -> feed URL - word from item[1]/title, definition from item[1]/merriam:shortdef - guard the body for "<rss" before parsing: xpath.loads errors on non-XML, so an unexpected HTML response would crash rather than render the error - empty-check now also catches None, which query() returns for a missing node Render layout, colors, fonts, cache key, TTL and cached payload shape are unchanged, and error states are still never cached. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
gderoo
requested review from
danielsitnik,
drudge and
matslina
as code owners
September 19, 2026 19:04
Next StepsHello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:
Manual Review RequiredHang tight! A Tidbyt engineer will be by shortly to review your change. Here is what they will be looking for:
|
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Word Of The Day app always renders "Something went wrong getting today's word!".
The cause is not a stale CSS selector.
https://www.merriam-webster.com/word-of-the-day/calendarnow returns HTTP 403 to server-side requests, so the app never reaches its parsing step:The response is a Cloudflare bot challenge (
cf-mitigated: challenge, body titled "Just a moment..."), returned regardless of User-Agent or request headers. I tested no-UA, a Go-http-client UA, a Chrome UA and a full browser header set — all 403, on both/word-of-the-day/calendarand/word-of-the-day.Fix
Merriam-Webster's official WOTD RSS feed,
https://www.merriam-webster.com/wotd/feed/rss2, is not subject to that rule:/word-of-the-day/calendarcf-mitigated: challenge/wotd/feed/rss2Same edge, same client, same second — the challenge is scoped to the HTML paths, so the feed is reachable server-side. It also exposes a
<merriam:shortdef>element carrying a short definition, which suits the 64x32 display and matches what the calendar scrape was after.Changes
html.star→xpath.star; calendar URL → feed URLitem[1]/title, definition fromitem[1]/merriam:shortdef. Items are newest-first, so the first is today's word — deliberately not date-matched, since the feed publishes at 01:00 ET and a device in a timezone ahead of that would find no entry for its "today"<rssbefore parsing.xpath.loadsraises on non-XML, so an unexpected HTML response would crash the app rather than render the error state — which matters here, since the failure being fixed is Cloudflare serving HTMLNone, whichquery()returns for a missing nodeNo new services or API keys. Render layout, colors, fonts, cache key, TTL and cached payload shape are unchanged, and error states are still never cached.
Testing
Verified with pixlet v0.34.0.
pixlet render— renders today's word correctlypixlet lint— cleanpixlet check apps/wordoftheday/— ✔️pixlet format— no changesFailure paths, each confirmed to render the error state without crashing:
<rssguardmerriam:shortdef<title>The last two were tested against crafted RSS fixtures served locally rather than a live feed. A two-item fixture also confirmed the app selects item 1 and ignores item 2, so the newest-first selection is doing what it claims rather than coincidentally matching today's word. The cache-hit path was verified to read back the written payload.
🤖 Generated with Claude Code