Loading...
Loading...
Scrape public posts from X.com (Twitter) users. Extracts text content, timestamps, engagement metrics (views, likes, retweets, replies), and generates direct post links. Use when user asks to scrape/fetch/analyze X.com posts or Twitter data, or mentions "整理@某人的发言" or "看看某人在X上说了什么".
npx skill4agent add aatrooox/blog.zzao.club x-scrapercd .opencode/skills/x-scraper/scripts
python3 scraper.py <username> [count]python3 scraper.py example_user 15/tmp/x_{username}_posts.jsonpython3 --versionpython3 -c "import playwright"ls /tmp/x_cookies_pw.jsonpython3 scraper.py <username> [count]python3 scraper.py <username> [count] --cookie-file /path/to/cookies.json{
"index": 1,
"username": "example_user",
"postId": "1234567890123456789",
"publishTime": "2025-12-03T18:28:32.000Z",
"postLink": "https://x.com/example_user/status/1234567890123456789",
"textContent": "Post text content...",
"views": "471K",
"likes": "1.1K",
"retweets": "153",
"replies": "44"
}postLinkpublishTimeviews/likes/retweets/repliesscraper.pypython3 scraper.py <username> [count] [--cookie-file <path>]/tmp/x_cookies_pw.jsonconvert_cookies.pypython3 convert_cookies.py <input-file> [output-file]