360 Secure SkillHub
360 安全技能中心

X News Crawler

这是基于本地CLI的X(Twitter)新闻爬虫,调用agent-browser实现爬取。支持top(热门)、latest(最新)、hybrid(先热门后最新去重排序)三种模式,可提取作者、发布时间、文本等结构化字段。典型场景:用户需按关键词获取X平台的热门或最新新闻/帖子时使用。使用前需安装依赖并启动带指定调试端口的Chrome;输入为含关键词、模式等参数的CLI命令,输出为结构化JSON。

leeguooooo
leeguooooo
热度 61.32
最近更新 2026-05-18 12:14:15
分类:搜索依赖:代码执行 / 联网浏览搜索 / 读写文件应用场景:研究 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add x-news-crawler
Metadata
name
x-news-crawler
description
Crawl X (Twitter) search results through a local CLI that wraps `abs` (agent-browser). Use when the user asks to scrape X posts by keyword, collect Top/Latest news, extract structured fields (author/time/text/link), or produce a deduplicated "top-first then latest" feed.

X News Crawler

Use this skill to run one command and get structured X news JSON.

Prerequisites (Required)

Before any crawl command, run:

pnpm add -g agent-browser-stealth
pnpm approve-builds -g

Run Chrome with CDP on the regular profile before crawling:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9333

Do not use --user-data-dir in that Chrome launch command.

Workflow

  1. Run the CLI, not raw abs commands.
  2. Use --mode hybrid by default: fetch top first, then latest, then sort by time and dedupe.
  3. Read JSON output and summarize signal/noise for the user.

Commands

From repository root, run:

./bin/x-news-crawler --query "openclaw" --mode hybrid --since-hours 72 --limit 30 --output .tmp/openclaw-news.json

Quick probes:

./bin/x-news-crawler --query "openclaw" --mode top --limit 10
./bin/x-news-crawler --query "openclaw" --mode latest --since-hours 24 --limit 20
./bin/x-news-crawler --query "openclaw" --cdp 9333 --limit 20

Output Contract

The CLI returns JSON with:

  • fetched_at
  • query
  • mode
  • count
  • warnings[]
  • failed_sources[]
  • rows[] with: source, datetime, status_url, user, text, replies, reposts, likes

Guardrails

  • Prefer hybrid unless the user explicitly asks only top or latest.
  • Keep since-hours small (24-168) to avoid stale content.
  • Treat unverified rumor posts as low confidence even with high engagement.

Reference

See cli.md for full flags.