fix(subscribestar): port gallery-dl date extraction (wrapped dates) + parse canary #123
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Image posts wrap the post date in an
<a>permalink (<div class="post-date"><a href="/posts/ID">DATE</a></div>); text-only posts don't. Our hand-written<div class="post-date">([^<]+)</div>regex matched only the unwrapped case → every image post got a nullpublished_atand sorted to the top of the feed looking broken (cheunart).Fix
Port gallery-dl's
_data_from_postdate method: take text up to the first</, then whatever follows the last>— handles both wrapped and plain. Verified against the live raw feed (all 6 dates parse, including the two previously null).Robust logging (requested)
_parse_postsnow logs per-page parse stats (posts / dated / with-body) and a WARNING canary when posts parse but none get a date/body while the raw markers ARE present — i.e. our extraction diverged from the live markup. Makes this failure class diagnosable from the worker log alone.Test: a permalink-wrapped date parses to ISO.
CI green on dev (run 1254).
🤖 Generated with Claude Code