Scrape A-share-related intelligence from multiple public Chinese financial/policy/social sources and output structured entries.
What this skill does
- Scrape Chinese financial news flashes (Cailianshe, Wallstreetcn, Jin10, Sina 7x24, Eastmoney Express)
- Scrape regulatory policy announcements (CSRC, PBOC, SSE, MOF)
- Scrape individual stock sentiment indicators from Eastmoney Guba
- Extract relevant A-share codes from titles/summaries
- Output JSON or Markdown for subsequent analysis, archiving, or feeding to an LLM
Capability boundaries
What it can do:
- Input a stock code (such as
000001,600519) to scrape that stock's Guba sentiment - When no code is input, scrape market-wide financial/policy news flashes
- Filter results by keyword
- Output JSON (structured) or Markdown (readable)
What it cannot do:
- Does not scrape content behind paywalls/login walls
- Does not guarantee real-time performance (the sources themselves are public aggregations and may have minute-level delays)
- Does not scrape exchange L1/L2 market data (this is news/sentiment scraping, not a market data interface)
- Does not replace compliant investment advisory research; output is only for information aggregation reference
Prerequisites
- Python 3.10+
requests(required)beautifulsoup4(optional, only needed when scraping policy sources)akshare(optional, used for name→code matching; without it, only regular expressions are used to extract codes)jieba(optional; after installation, name matching uses word segmentation, reducing false matches)- Environment variable
JIN10_APP_ID(required by the Jin10 data interface; if not set, that source is skipped and othercnsources are unaffected)
Minimal installation:
pip install requests
# 如需政策来源:
pip install beautifulsoup4
# 如需名称匹配:
pip install akshare
# 如需更精确的名称匹配:
pip install jieba
Usage
Method 1: Call directly in conversation
/ashare-news-fetcher 000001,600519 cn,guba
Parameter description (all optional):
- First parameter: stock code, comma-separated, e.g.
000001,600519 - Second parameter: source groups, comma-separated; optional values
cn(Chinese news flashes),policy(policy),guba(Guba) - When no parameters are passed, defaults to
--sources cn --limit 30
Method 2: Run the script directly
python scripts/fetch_intel.py --sources cn,policy --limit 20
python scripts/fetch_intel.py --symbols 000001,600519 --sources guba
python scripts/fetch_intel.py --sources cn --keywords 降准,降息 --format markdown
Common options:
--sources: source groups, defaultcn--symbols: stock code, used forguba--keywords: keyword filter, comma-separated--limit: maximum number of items returned per group, default 30--format:jsonormarkdown, defaultjson--output: output to file; if omitted, print to stdout--verbose: print debug logs
Source description
| Source group | Source | Content type | Whether bs4 is required |
|---|---|---|---|
cn |
Cailianshe, Wallstreetcn, Jin10, Sina 7x24, Eastmoney Express | Market news flashes | No |
policy |
CSRC, PBOC, SSE, MOF | Policy/Regulatory Announcements | Yes (except CSRC) |
guba |
East Money Stock Forum | Individual Stock Retail Investor Sentiment | No |
For detailed API endpoints and parsing methods, see references/source_apis.md。
Test
For test instructions and how to run, see references/testing.md。
Output Format
JSON
For the structure of each item, see references/output_schema.md. Example:
{
"item_id": "4ffde7bc7b18b55e",
"source_id": "cn_sina",
"source_name": "sina",
"title": "...",
"summary": "...",
"url": "...",
"category": "market",
"priority": "normal",
"tags": ["公司", "市场"],
"related_symbols": ["000001"],
"published_at": "2026-06-25 17:50:41",
"fetched_at": "2026-06-25 09:50:52",
"extra": {}
}
Markdown
Sorted in reverse chronological order, each entry shows source, time, category, related code, tags, link, and summary.
Notes
- Public APIs may change at any time; the script will skip failed sources without affecting other sources.
- If you encounter request failures in a domestic network environment, confirm that the system HTTP_PROXY/HTTPS_PROXY points to an available proxy.
gubaThe source is relatively sensitive to anti-scraping, so it is recommended not to request too many stocks at once; there is already a 0.5s request interval between codes.- Before using Jin10 Data (
jin10), it is recommended to configureJIN10_APP_IDin the environment variables; if not configured, this source will be automatically skipped, without affecting othercnsources such as Cailian Press, Wallstreetcn, Sina, East Money, etc.export JIN10_APP_ID="your-app-id"
Next Step
After obtaining structured intelligence, the common next step is to hand it to the analysis skill for summarization or daily report generation:
Would you like to summarize these messages and generate an A-share news daily report?
- A) Generate a Markdown briefing (recommended)
- B) Only do sentiment/keyword aggregation
- C) Not needed, the current output is sufficient