SuperAPI AI Directory

crawl-xueqiu-user-timeline

General & other

View repository

Updated 10-15 20:13

About this skill

crawl-xueqiu-user-timeline

Scrape a Xueqiu user's post timeline and save it as a Markdown file.

Prerequisites

Base directory for this skill: {base_dir}

When calling, replace {base_dir} with the actual path, for example:/home/cnife/code/try-agent-browser-automation/.agents/skills/crawl-xueqiu-user-timeline

Make sure Chrome is in Debug mode and install agent-browser:

sh {base_dir}/scripts/check-cdp.sh
sh {base_dir}/scripts/check-agent-browser.sh

Usage

Run the scraping script directly:

{base_dir}/scripts/crawl_xueqiu_user_timeline_api.py <雪球用户主页链接> [选项]

Parameter Description

Parameter Description Default Value
url Xueqiu user profile link Required
--days Scrape the last N days 3
--start-date Start date (YYYY-MM-DD) 3 days ago
--end-date End date (YYYY-MM-DD) Today
-o, --output Output file name Automatically generated

Note:--days and --start-date parameters are mutually exclusive and cannot be used at the same time.

Example

# 爬取最近 3 天(默认)
{base_dir}/scripts/crawl_xueqiu_user_timeline_api.py https://xueqiu.com/u/9493911686

# 爬取最近 7 天
{base_dir}/scripts/crawl_xueqiu_user_timeline_api.py https://xueqiu.com/u/9493911686 --days 7

# 爬取最近 30 天
{base_dir}/scripts/crawl_xueqiu_user_timeline_api.py https://xueqiu.com/u/9493911686 --days 30

# 指定日期范围
{base_dir}/scripts/crawl_xueqiu_user_timeline_api.py https://xueqiu.com/u/9493911686 --start-date 2026-01-01 --end-date 2026-03-05

# 指定输出文件名
{base_dir}/scripts/crawl_xueqiu_user_timeline_api.py https://xueqiu.com/u/9493911686 -o my_timeline.md

Output Format

Generate a Markdown file containing:

  • Basic user information (UID, followers, following, post count)
  • Posts sorted by time
  • Each post includes: publication time, content, quoted content (if any), engagement data, original link

Notes

  1. You need to log in to your Xueqiu account first
  2. If you encounter a Verification page, you need to complete the verification manually and then run again
  3. During scraping, pagination and the md5__1038 token are handled automatically
  4. The output file is saved in the current working directory

Do you need further analysis?

After scraping is complete, please ask the user: Do you need a summary and analysis of the Xueqiu user's posts?