SuperAPI AI Directory

crawl-xueqiu-timeline

Data & analytics

View repository

Updated 10-15 20:13

About this skill

crawl-xueqiu-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, please replace {base_dir} with the actual path, for example:/home/cnife/code/try-agent-browser-automation/.agents/skills/crawl-xueqiu-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_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_timeline_api.py https://xueqiu.com/u/9493911686

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

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

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

# 指定输出文件名
{base_dir}/scripts/crawl_xueqiu_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)
  • Post records sorted by time
  • Each post includes: publish time, content, quoted content (if any), interaction 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 manually complete the verification and then run again
  3. Pagination and the md5__1038 token are automatically handled during scraping
  4. The output file is saved in the current working directory

Do you need further analysis?

After scraping is complete, please ask the user: Would you like me to summarize and analyze the Xueqiu user's posts?