Skip to content
Skills Library
Data & analytics · Automation

x-scraper

/x-scraper

X (Twitter) 抓取 skill - 通过 agent-browser (CDP) 抓取指定用户推文或首页推荐流,支持关键词过滤、Tab 切换、多格式输出。使用场景:按用户/关键词抓取时间线、查看首页推荐流、生成 RSS/JSON/Markdown。

Repository
aworld ↗
Licence
MIT
Last repository change
14.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
2
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 14.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scrape_x_home.sh, scrape_x_user.sh

What it does and when to use it

X (Twitter) 抓取 skill - 通过 agent-browser (CDP) 抓取指定用户推文或首页推荐流,支持关键词过滤、Tab 切换、多格式输出。使用场景:按用户/关键词抓取时间线、查看首页推荐流、生成 RSS/JSON/Markdown。

Original author description

X (Twitter) 抓取 skill - 通过 agent-browser (CDP) 抓取指定用户推文或首页推荐流,支持关键词过滤、Tab 切换、多格式输出。使用场景:按用户/关键词抓取时间线、查看首页推荐流、生成 RSS/JSON/Markdown。

How it works

  1. 概述
  2. 工具路径
  3. 1. 用户帖子抓取 (scrapexuser.sh)
  4. 2. 首页推荐流抓取 (scrapexhome.sh)
Original SKILL.md headings · 85 lines, 273 words
SKILL.md preview
---
name: x-scraper
description: X (Twitter) 抓取 skill - 通过 agent-browser (CDP) 抓取指定用户推文或首页推荐流,支持关键词过滤、Tab 切换、多格式输出。使用场景:按用户/关键词抓取时间线、查看首页推荐流、生成 RSS/JSON/Markdown。
---

# X 抓取 (x-scraper)

## 概述

通过已连接 CDP 的浏览器(agent-browser)抓取 X (Twitter) 内容,包含两个脚本:

1. **scrape_x_user.sh** — 抓取指定用户时间线,可选关键词过滤
2. **scrape_x_home.sh** — 抓取当前登录用户的首页推荐流(For you / Following)

输出格式统一支持 Markdown / RSS / JSON。

## 工具路径

- 用户抓取:`./scrape_x_user.sh`
- 首页推荐:`./scrape_x_home.sh`
- 依赖:`agent-browser`(CDP 已连接且已登录 X)、`python3`

---

## 1. 用户帖子抓取 (scrape_x_user.sh)

按用户名抓取最新帖子,可选关键词搜索过滤。

### 用法

```bash
././scrape_x_user.sh [-u <username>] [-k <keyword>] [-p <cdp_port>] [-n <max_scrolls>] [-o <output_file>] [-f <format>]
```

### 参数

| 参数 | 说明 | 默认 |
|------|------|------|
| `-u` | X 用户名(不带 @) | Alibaba_Qwen |
| `-k` | 搜索关键词(可选,不指定则抓取用户全部最新帖子) | - |
| `-p` | CDP 端口 | 9222 |
| `-n` | 最大滚动次数 | 10 |
| `-o` | 输出文件路径 | stdout |
| `-f` | 格式:`md` \| `rss` \| `json` | md |

### 示例

```bash
././scrape_x_user.sh
././scrape_x_user.sh -k qwen3
././scrape_x_user.sh -u chenchengpro -k claw -f rss -o feed.xml
././scrape_x_user.sh -u chenchengpro -f json -n 20 -o data.json
```

---

## 2. 首页推荐流抓取 (scrape_x_home.sh)

抓取当前登录用户的 X 首页推荐内容,支持 For you / Following 两个 Tab 切换。

### 用法

```bash
././scrape_x_home.sh [-t <tab>] [-p <cdp_port>] [-n <max_scrolls>] [-o <output_file>] [-f <format>]
```

### 参数

| 参数 | 说明 | 默认 |
|------|------|------|
| `-t` | 推荐 Tab:`foryou` \| `following` | foryou |
| `-p` | CDP 端口 | 9222 |
| `-n` | 最大滚动次数 | 5 |
| `-o` | 输出文件路径 | stdout |
| `-f` | 格式:`md` \| `rss` \| `json` | md |

### 输出字段

每条帖子包含:`author`(作者名 + handle)、`time`(ISO 时间戳)、`text`(正文)、`link`(帖子链接)、`hasMedia`(是否含图片/视频)、`retweet`(转推/置顶上下文)

### 示例

```bash
././scrape_x_home.sh                           # 抓取 For you 推荐流
././scrape_x_home.sh -t following -n 10        # 抓取 Following 时间线
././scrape_x_home.sh -f json -o feed.json      # JSON 输出到文件
././scrape_x_home.sh -n 3 -f rss -o home.xml   # 少量抓取,RSS 输出
```
Files in this package (3)
  • SKILL.md 3 KB
  • scrape_x_home.sh 11 KB
  • scrape_x_user.sh 10 KB

Versions

The database has no other skills named x-scraper.

Database snapshot: 13.11.2026 · package version e16ca9cd9d31 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95safe-rss-news-ingestor
    Fetch, clean, deduplicate, and normalize RSS/Atom news feeds with strict SSRF protection, HTML stripping, UTC timestamp ordering, and media-enclosure filtering. Use when the user wants to aggregate live news, track releases/articles across multiple RSS feeds, or build a clean JSON/Markdown digest.
  • 100x-twitter-scraper-cn
    使用 Xquik x-twitter-scraper Skill 规划 X/Twitter 数据工作流。适用于推文搜索、账号时间线、粉丝导出、媒体下载、账号或关键词监控、HMAC Webhook、MCP 配置和 SDK 选型。需要用户自己的 Xquik API Key,不要求 X 登录材料。
  • 90add-rss-feed
    Add or change a WorldMonitor news/RSS feed — catalog entry, RSS proxy allowlist mirrors, source tier, propaganda-risk review, and attribution. Use when adding a feed URL, a publisher, or a domain that the RSS proxy must fetch.
  • 100x-twitter-scraper
    Plan X/Twitter data workflows through the Xquik x-twitter-scraper skill. Use when the user needs tweet search, profile timelines, follower export, media download, account or keyword monitoring, HMAC webhooks, MCP setup, or SDK selection. Requires a user-issued Xquik API key and…
  • 100rss-feeds
    Use when reading an RSS, Atom, or JSON feed, checking what is new on a blog, site, or GitHub repo, or discovering the feed behind a page URL
  • 90web-scraper
    Intelligent web scraper that fetches any URL and returns clean Markdown content. Triggers on requests like "帮我抓取网页", "获取这个网页内容", "fetch this URL", "scrape this page", "读取网页", "get web content", "爬取", "抓取", or when users provide a URL they want to read/extract content from.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.