Skip to content

feat(x-oembed): add Twitter thread extraction and API fallback support#330

Open
kvh03 wants to merge 1 commit into
kepano:mainfrom
kvh03:feat/twitter-thread-support
Open

feat(x-oembed): add Twitter thread extraction and API fallback support#330
kvh03 wants to merge 1 commit into
kepano:mainfrom
kvh03:feat/twitter-thread-support

Conversation

@kvh03

@kvh03 kvh03 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Enhance XOembedExtractor to fetch complete Twitter/X threads when available, rather than limiting extraction to the original tweet. Additionally, implement a v1 API fallback to handle rate limiting and service outages gracefully.

  • Thread Extraction: Integrated FxTwitter v2 Thread API to retrieve full thread conversations.
  • Fallback Cascade: Implemented a reliable API fallback sequence:
    1. FxTwitter v2: Thread/Article API.
    2. FxTwitter v1: Single-tweet fallback.
    3. oEmbed: Twitter's official oEmbed API as the final safeguard.
  • Consistency: Standardized HTML output for threads (using <hr> separators) to align with existing conversation extractor patterns.
  • Testing: Added new regression test suites in tests/x-oembed-surrogates.test.ts covering successful thread rendering, rate-limit (429) cascades, and complete API failure (500) scenarios.

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