← 返回 Skills 市场
dimaschand29

Cnbc Geopolitics Fetcher

作者 Dimas Chandra · GitHub ↗ · v1.0.3 · MIT-0
cross-platform ⚠ suspicious
357
总下载
0
收藏
3
当前安装
4
版本数
在 OpenClaw 中安装
/install cnbc-geopolitics-fetcher
功能描述
Automated geopolitical intelligence agent that fetches 5 hottest CNBC news articles from last 24 hours, extracts structured data (Title, URL, Market Impact,...
使用说明 (SKILL.md)

CNBC Geopolitics Fetcher Skill

Purpose

Fetches latest CNBC geopolitical news articles, extracts complete factual data (NO truncation), and posts each article individually to Discord with enhanced analyst/Polymarket-relevant context.

What This Skill Does

  1. Scrapes 5 latest CNBC articles on geopolitics (Iran, Middle East, oil markets, energy policy)
  2. Extracts complete sentences - NO truncation or summarization
  3. Identifies analyst forecasts and Polymarket-relevant data (odds, probabilities, market pricing)
  4. Posts each article as a separate Discord message (1-by-1, not batched)
  5. Auto-splits long messages to fit Discord's 2000-character limit

Quick Start (One Command)

Run this from workspace root:

python "C:\Users\Legion 5i Pro\.openclaw\workspace\skills\cnbc-geopolitics-fetcher\scripts\fetch_cnbc_geopolitics.py" --webhook "YOUR_DISCORD_WEBHOOK_URL" --verbose

Required Arguments

  • --webhook: Discord webhook URL (required)
  • --config: Path to config file containing webhook (alternative to --webhook)
  • --count: Number of articles to fetch (default: 5)
  • --verbose: Show detailed extraction output

Example (Full Command)

python "C:\Users\Legion 5i Pro\.openclaw\workspace\skills\cnbc-geopolitics-fetcher\scripts\fetch_cnbc_geopolitics.py" --webhook "https://discord.com/api/webhooks/1482043765471445333/-cHOLCqBtvU_Wua8STfoINes7J0pFNFsXB27EJ3f8F7BklC5P_OkIGAx2HQLDPZe1bNJ" --count 5 --verbose

Configuration

Option 1: Command-Line Webhook

Pass webhook URL directly:

python fetch_cnbc_geopolitics.py --webhook "https://discord.com/api/webhooks/..."

Option 2: Config File

Create references/config.md with:

## Discord Webhook
https://discord.com/api/webhooks/1482043765471445333/-cHOLCqBtvU_Wua8STfoINes7J0pFNFsXB27EJ3f8F7BklC5P_OkIGAx2HQLDPZe1bNJ

Then run:

python fetch_cnbc_geopolitics.py --config "C:\Users\Legion 5i Pro\.openclaw\workspace\skills\cnbc-geopolitics-fetcher\references\config.md"

Output Format (Discord Message)

Each article posts as:

### Article

**[Full Article Title]**

**URL:** https://www.cnbc.com/2026/03/13/...

**Market Impact:** Energy: [complete sentence about oil/energy]; Stocks: [complete sentence about markets]; Analyst: [forecast/prediction]

**Hard Facts:**
  - Official: [complete quoted statement from official]
  - Action: [complete sentence describing military/diplomatic action]
  - Data: [complete sentence with numbers/statistics]
  - Timeline: [complete sentence with dates/deadlines]
  - Analyst: [complete sentence with forecast/market prediction]

*(Raw data - no editorial analysis)*

Key Features

  • Complete sentences - NO truncation (removed all length limits)
  • Analyst/Polymarket data - extracts forecasts, odds, probabilities, market pricing
  • One-by-one posting - each article is a separate Discord message
  • Auto-split - messages >2000 chars split into parts automatically

How It Works (Architecture)

1. Article Discovery

  • Searches CNBC HTML for article links matching pattern: https://www.cnbc.com/YYYY/MM/...
  • Filters out video, premium, pro, tag, section, live URLs
  • Returns up to 25 unique geopolitical article URLs

2. Article Scraping

  • Uses Scrapling (stealth headless browser) to bypass anti-bot protections
  • Extracts: title, full article text, description metadata
  • Falls back to regex extraction if Scrapling fails

3. Fact Extraction (NO Truncation)

  • Splits article text into complete sentences
  • Scans for 6 fact categories:
    1. Official: Quoted statements with attribution (said/stated/announced)
    2. Action: Military/diplomatic/economic actions (strike/launch/sanctions)
    3. Data: Numbers with units (million/billion/percent/barrel/$)
    4. Timeline: Dates/deadlines (by/before/after/until/expected)
    5. Analyst: Forecasts/predictions (forecast/expect/project/likely/recession)
    6. Market: Polymarket/prediction market language (odds/probability/betting)
  • Returns up to 5 complete facts per article

4. Market Impact Extraction

  • Scans for energy, stocks, currency, analyst, Polymarket sentences
  • Returns complete sentences (NO length limits)
  • Categories: Energy, Stocks, Currency, Analyst, Polymarket

5. Discord Posting

  • Formats each article as markdown
  • Checks message length against 2000-char Discord limit
  • If too long: splits into Title+URL+Market, Facts, Disclaimer parts
  • Posts each article individually (not batched)
  • Small delay (0.3s) between split parts

File Structure

skills/cnbc-geopolitics-fetcher/
├── SKILL.md                 # This documentation
├── scripts/
│   └── fetch_cnbc_geopolitics.py   # Main scraper script
└── references/
    └── config.md            # Discord webhook configuration

Dependencies

  • Python 3.x
  • scrapling (stealth web scraping)
  • beautifulsoup4 (HTML parsing)
  • requests (HTTP client)

Install dependencies:

pip install scrapling beautifulsoup4 requests

Customization Tips

Change Article Count

python fetch_cnbc_geopolitics.py --webhook "..." --count 10

Output to File Instead of Discord

python fetch_cnbc_geopolitics.py --output "output.md" --count 5

Disable Verbose Output

Remove --verbose flag for cleaner console output.


Troubleshooting

Error: "can't open file"

  • Quote the full path: python "C:\path\with\spaces\script.py"
  • Use forward slashes or escape backslashes

Error: "Discord error 400"

  • Message exceeds 2000 characters
  • Script should auto-split, but check format_single_article() function

Error: "No facts extracted"

  • Article may have anti-bot protection
  • Check Scrapling installation: pip install scrapling
  • Try with --verbose to see extraction details

Error: "ModuleNotFoundError"

  • Install dependencies: pip install scrapling beautifulsoup4 requests

LLM Integration Notes

For Any LLM to Use This Skill

  1. Read this SKILL.md - understand purpose and usage
  2. Check config.md - get webhook URL from references/config.md
  3. Run the command - execute the Python script with proper path quoting
  4. Verify output - check Discord for posted articles

Key Constraints to Remember

  • NO truncation - script extracts complete sentences only
  • One-by-one posting - each article = separate Discord message
  • Raw facts only - no editorial analysis or opinions
  • Polymarket-ready - extracts analyst forecasts and prediction market data

Example LLM Prompt

"Fetch latest CNBC geopolitical news and post to Discord using the cnbc-geopolitics-fetcher skill."

Expected LLM Action

  1. Locate skill at: skills/cnbc-geopolitics-fetcher/
  2. Read config: references/config.md for webhook URL
  3. Execute:
    python "skills/cnbc-geopolitics-fetcher/scripts/fetch_cnbc_geopolitics.py" --config "skills/cnbc-geopolitics-fetcher/references/config.md" --verbose
    
  4. Confirm: "5 articles posted individually to Discord"

Version History

  • v2.0 (2026-03-15): One-by-one posting, NO truncation, analyst/Polymarket extraction, auto-split long messages
  • v1.0: Initial batched posting with truncation limits

Support

  • Skill location: C:\Users\Legion 5i Pro\.openclaw\workspace\skills\cnbc-geopolitics-fetcher\
  • Script: scripts/fetch_cnbc_geopolitics.py
  • Config: references/config.md
安全使用建议
Do not run this skill with the bundled config or example webhook. The repo contains a live Discord webhook URL — if you run the script pointing to that file you will send scraped full-article content to an external Discord channel (possible data/copyright leakage and unwanted disclosure). Before using: (1) remove or replace the embedded webhook with one you control; (2) inspect the code paths that post to the webhook (scripts/fetch_cnbc_geopolitics.py) and test with --output to file rather than posting; (3) consider legal/ToS and ethical implications of stealth scraping and posting untruncated copyrighted content; (4) run in an isolated environment and review references/sent_urls.txt to understand what will be tracked/sent. If you cannot verify the ownership of the bundled webhook and the intent of the publisher, treat the skill as unsafe to run as-is.
功能分析
Type: OpenClaw Skill Name: cnbc-geopolitics-fetcher Version: 1.0.3 The skill bundle is a specialized news scraper designed to fetch geopolitical articles from CNBC and post them to a Discord channel. The primary script, `scripts/fetch_cnbc_geopolitics.py`, uses standard libraries (requests/BeautifulSoup) to extract specific factual data and analyst forecasts for use in prediction markets like Polymarket. While the bundle contains a hardcoded Discord webhook URL in `SKILL.md` and `references/config.md` (representing a credential leak/exposure), the code logic is strictly limited to its stated purpose and shows no signs of data exfiltration, unauthorized local file access, or malicious prompt injection.
能力评估
Purpose & Capability
The skill claims to fetch CNBC geopolitical articles and post them to Discord — that matches the code. however, the package includes a pre-populated Discord webhook (references/config.md and examples) baked into the repo and SKILL.md examples. The skill declares no required credentials/environment variables but effectively ships with a credential (webhook URL) that will cause scraped content to be sent to an external endpoint. Including someone else's webhook in the skill is disproportionate and unexplained.
Instruction Scope
Runtime instructions and the Python code explicitly scrape full articles ("NO truncation") and post complete sentences to Discord one-by-one. The SKILL.md and code point at the included references/config.md which contains a Discord webhook; the instructions therefore direct scraped (potentially copyrighted or sensitive) content to that external endpoint. The SKILL.md also states it uses a stealth headless scraper to "bypass anti-bot protections," which raises ethical/operational concerns (possible ToS violations, evasion techniques).
Install Mechanism
There is no install spec (instruction-only install), which is lower risk for arbitrary installs. Dependencies are standard Python libraries (requests, beautifulsoup4) plus a stealth scraping package ('scrapling') called out in SKILL.md. Nothing in the package indicates a remote binary download or obscure install URL, but the use of a stealth scraping library is noteworthy.
Credentials
The skill declares no required environment variables or primary credential, yet the repository contains an explicit Discord webhook URL in references/config.md and example commands that use that webhook. Shipping a usable webhook in the repo is equivalent to requesting write-access to an external channel without declaring it — disproportionate and risky (data exfiltration, unwanted posting).
Persistence & Privilege
The skill is not marked always:true, does not request elevated platform privileges, and does not modify other skills or system-wide configs. It appears to run only when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cnbc-geopolitics-fetcher
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cnbc-geopolitics-fetcher 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.3
- Updated `references/sent_urls.txt` with new URLs or entries. - No changes to code or documentation.
v1.0.2
**Changelog for cnbc-geopolitics-fetcher v1.0.2** - Added `references/sent_urls.txt` to store or reference sent article URLs. - Added new formatting script: `scripts/format_new.py`. - Updated main script (`fetch_cnbc_geopolitics.py`) for integration with the above changes.
v1.0.1
**Major update: Now posts each CNBC geopolitical article individually to Discord with complete, untruncated facts and enhanced analyst/Polymarket data extraction.** - Switched from batching to posting each article as a separate Discord message, ensuring full detail per story. - Extracts and formats only complete sentences (no truncation), providing maximum context and raw data. - Adds support for identifying analyst forecasts and prediction market (Polymarket) signals in each article. - Implements automatic message splitting to respect Discord's 2000-character limit. - Updated documentation with explicit usage instructions, output format, troubleshooting, and customization details.
v1.0.0
cnbc-geopolitics-fetcher v1.0.0 – Initial Release - Automates fetching of the 5 hottest recent CNBC geopolitical news articles with structured extraction of Title, URL, Market Impact, and Hard Facts. - Posts formatted news briefings directly to a Discord webhook for executive or automated reporting. - Supports configurable webhooks and adjustable article count/output file options. - Enforces strict data protocol with no editorial language and mandatory structured fields. - Includes error handling for missing webhooks, API issues, and network failures. - Provides automation examples for daily scheduling and heartbeat integration.
元数据
Slug cnbc-geopolitics-fetcher
版本 1.0.3
许可证 MIT-0
累计安装 3
当前安装数 3
历史版本数 4
常见问题

Cnbc Geopolitics Fetcher 是什么?

Automated geopolitical intelligence agent that fetches 5 hottest CNBC news articles from last 24 hours, extracts structured data (Title, URL, Market Impact,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 357 次。

如何安装 Cnbc Geopolitics Fetcher?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cnbc-geopolitics-fetcher」即可一键安装,无需额外配置。

Cnbc Geopolitics Fetcher 是免费的吗?

是的,Cnbc Geopolitics Fetcher 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cnbc Geopolitics Fetcher 支持哪些平台?

Cnbc Geopolitics Fetcher 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cnbc Geopolitics Fetcher?

由 Dimas Chandra(@dimaschand29)开发并维护,当前版本 v1.0.3。

💬 留言讨论