x-tweet-by-url
它能做什么
这项技能接收一个 X 或 Twitter 链接,并返回该页面上显示的推文。适合已经有链接、想直接获取其中数据、又不想自己选择方法的人。
适用场景
- ✓当你有一个 X 搜索链接,想把其中的推文整理成列表时。
- ✓当你有一条推文的链接,想查看其详细信息时。
- ✓当你有一个 X 列表链接,想查看其中显示的推文的时候。
技能链接
https://github.com/browser-act/skills/blob/main/solutions/social-listening/x-tweet-by-url/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“这是一个 X 搜索链接。请帮我整理它显示的推文,包括作者和互动数。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会判断链接指向哪种 X 页面,在你已登录的浏览器中打开它,并读取加载出的推文。它返回每条推文的正文、作者、互动数、媒体、话题标签、提及,以及用于获取更多内容的游标。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
X — Tweets by URL
Any X URL (search, profile, single tweet, list) → normalized list of tweets matching that URL's timeline.
Language
All process output to user (progress updates, process notifications) follows the user's language.
Objective
Accept any X URL as input, automatically detect which timeline endpoint it triggers, navigate to it, and return structured per-tweet data with pagination cursors. This unifies search, profile, single-tweet conversation, and list extraction under one entry point.
Prerequisites
- Active X session in the browser (left sidebar shows logged-in avatar / @handle).
- Network capture is enabled in the browser-act session.
Pre-execution Checks
1. Tool Readiness
If browser-act has been confirmed available in the current session → skip this step.
Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.
2. Login Verification
If login status for X has been confirmed in the current session → skip this step.
Otherwise: open https://x.com and observe the left sidebar:
- User avatar or @handle visible → logged in, continue
- "Sign in" / "Log in" prompt visible → not logged in, inform the user and assist the login flow
User refuses or cannot log in → terminate execution.
Capability Components
This Skill's operational boundary = what the user can manually do in their browser. It only reads tweet data already shown to the user, never bypassing authentication. The browser's own JS signs the GraphQL request; the Skill triggers it via URL navigation and reads the response from network traffic. Python scripts under
scripts/only classify URLs and parse responses — they do not call X directly. Run them through the bash tool.
Network Capture: tweets via input URL
Step 1 — classify the URL to determine which GraphQL endpoint will be triggered and which --source to pass to the parser:
META=$(python scripts/classify-url.py '{url}')
classify-url.py outputs a JSON object with fields:
normalized_url: the URL withtwitter.comrewritten tox.com.kind: one ofsearch,user_tweets,user_replies,user_media,tweet_detail,list,unknown.endpoint: the GraphQL endpoint name to filter by (SearchTimeline/UserTweets/UserTweetsAndReplies/UserMedia/TweetDetail/ListLatestTweetsTimeline).extract_source: the--sourcevalue to pass toparse-tweets.py(search/user_tweets/user_replies/user_media/tweet_detail/list).params: detected path parameters (handle,tweet_id,list_id) when applicable.
If kind == "unknown", report to the user that the URL is not a supported X timeline type and stop.
Step 2 — navigate and capture the first page:
network requests --clearnavigate "$(echo "$META" | python -c "import sys,json;print(json.load(sys.stdin)['normalized_url'])")"wait stable --timeout 25000(timeout is normal on X; proceed)- Let
EP=endpointfrom$META.network requests --type xhr,fetch --filter "$EP"→ take the latest entry'srequest_id. network request <request_id>→ save totmp/x-url-page-1.txt.- Let
SRC=extract_sourcefrom$META.python scripts/parse-tweets.py --json-file tmp/x-url-page-1.txt --source "$SRC".
Endpoint characteristic: URL contains /i/api/graphql/<hash>/<endpoint-name>. The query hash rotates; always filter by name.
Step 3 — paginate via scroll (skip when kind == "tweet_detail" and only the focal tweet is required; keep paginating when collecting the full reply thread):
network requests --clearscroll down --amount 5000wait stable --timeout 10000network requests --type xhr,fetch --filter "$EP"→ newest entry'srequest_idnetwork request <request_id>→ save totmp/x-url-page-N.txtpython scripts/parse-tweets.py --json-file tmp/x-url-page-N.txt --source "$SRC"
Repeat Step 3 until any termination condition is met:
- Accumulated unique tweet count reaches the user's target.
count == 0on the current page.cursor_bottomis unchanged across two consecutive pages.
Error handling: if no matching request appears after a scroll, wait 3 s and retry once. If kind == "search" and the page shows a captcha challenge (detect via state showing an "Authorize access to your account" or "Help us keep X safe" panel), pause and ask the user. If kind == "list" and the response's `data.list.twe
常见问题
哪些链接可以使用?
描述中涵盖搜索页面、个人主页、单条推文和列表时间线。
我需要登录吗?
需要。这项技能需要你的浏览器中有一个有效的 X 会话。
我可以一次提供多个链接吗?
可以。描述中说明,它接受 X 和 Twitter 的混合链接。
详情
作者的原始描述
Scrapes tweets from any X (Twitter) URL — search results, user profile, single tweet detail, or list timeline — and returns normalized per-tweet data with text, author, engagement counts, media, hashtags, mentions, and cursor for pagination. Use when user mentions X URL scraper, Twitter URL scraper, scrape from URL, given an X link, given a Twitter link, accept mixed X URLs, accept mixed Twitter URLs, search URL, profile URL, list URL, status URL, tweet detail URL, scrape startUrls Twitter, X startUrls, mixed batch of Twitter links, paste links and scrape, mass URL extraction X, mass URL extra
repo: browser-act/skills
热度
- GitHub 星标
- 6.3k
- 排名
- #14320
- 许可证
- MIT
- 更新时间
- 2026/8/24
评论
- …
同一仓库的更多技能
browser-act-skill-forge
6.3k帮你的智能体探索一次网站,并保存一个带脚本的可复用技能,使之后从该网站提取数据更快。
browser-act
6.3k帮你的智能体运行浏览器自动化工具,打开页面、读取渲染后的内容、填写表单、截图,并管理已登录的会话。
1688-product-detail
6.3k帮你的智能体从 1688.com 批发页面提取商品详情,例如价格阶梯、规格变体、卖家统计数据和属性。
airbnb-listing-detail
6.3k帮你的智能体根据 ID 获取 Airbnb 房源的公开详情,例如照片、设施、评分和房屋规则。