Skip to content

Fix x.com status ingestion via fxtwitter - #3

Open
onevcat wants to merge 1 commit into
mainfrom
fix/x-fxtwitter-status-fallback
Open

Fix x.com status ingestion via fxtwitter#3
onevcat wants to merge 1 commit into
mainfrom
fix/x-fxtwitter-status-fallback

Conversation

@onevcat

@onevcat onevcat commented Mar 1, 2026

Copy link
Copy Markdown
Owner

What

  • For x.com / twitter.com status URLs (/.../status/<id>), ingest via fxtwitter API instead of fetching HTML directly.
  • Ensure the translation prompt always includes an H1 title (# <title>) so the assistant can translate it.
  • Make apply-translation.mjs robust when source.md has missing/empty frontmatter (strip undefined fields + default date).

Why

Direct HTML fetch to x.com is often blocked and returns the “Something went wrong…” bot-detection page, producing junk source.md/prompt and requiring manual retries.

Tests

  • Added unit tests for scripts/x-article.mjs and for apply-translation.mjs handling missing frontmatter.
  • npm test passes.

Co-authored-by: onevclaw <onevclaw@onevcat.com>
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.

1 participant