fix(twitter): resolve article ID to tweet ID for article URLs#691
Closed
fix(twitter): resolve article ID to tweet ID for article URLs#691
Conversation
Article URLs (x.com/i/article/{articleId}) use a different ID than
tweet status URLs. The GraphQL TweetResultByRestId endpoint requires
the parent tweet ID, not the article ID.
Fix: detect article URLs upfront, navigate to the article page to
extract the parent tweet ID from DOM links, then use the resolved
tweet ID for GraphQL. Status URLs continue to work as before.
Closes #688 (supersedes PR from gucasbrg — fixes the bug where all
inputs were routed through article page, breaking status URL flow).
Owner
Author
|
Fixed directly on PR #688's branch instead. |
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.
Summary
x.com/i/article/{articleId}) use a different ID than tweet status URLsTweetResultByRestIdendpoint requires the parent tweet ID, not the article IDFix
a[href*="/status/"]) orog:urlmeta tagTest plan
opencli twitter article https://x.com/i/article/2038726133869625344— should resolve to tweet ID and return articleopencli twitter article https://x.com/user/status/123456— should work as before (no article resolution)opencli twitter article 123456— bare ID should work as before