← 返回 Skills 市场
camopel

finviz-crawler

作者 camopel · GitHub ↗ · v3.0.0
cross-platform ⚠ suspicious
672
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install finviz-crawler
功能描述
Continuous financial news crawler for finviz.com with SQLite storage, article extraction, and query tool. Use when monitoring financial markets, building new...
使用说明 (SKILL.md)

finviz-crawler

Why This Skill?

📰 Your own financial news database — most finance skills just wrap an API for one-shot queries. This skill runs continuously, building a local archive of every headline and article from Finviz. Query your history anytime — no API limits, no missing data.

🆓 No API key, no subscription — scrapes finviz.com directly using Crawl4AI + RSS. Bloomberg, Reuters, Yahoo Finance, CNBC articles extracted automatically. Zero cost.

🤖 Built for AI summarization — the query tool outputs clean text/JSON optimized for LLM digests. Pair with an OpenClaw cron job for automated morning briefings, evening wrap-ups, or weekly investment summaries.

💾 Auto-cleanup — configurable expiry automatically deletes old articles from both the database and disk. Set --expiry-days 30 to keep a month of history, or 0 to keep everything forever.

🔄 Daemon architecture — runs as a background service that starts/stops with OpenClaw. No manual intervention needed after setup. Works with systemd (Linux) and launchd (macOS).

Install

python3 scripts/install.py

Works on macOS, Linux, and Windows. Installs Python packages (crawl4ai, feedparser), sets up Playwright browsers, creates data directories, and verifies everything.

Manual install

pip install crawl4ai feedparser
crawl4ai-setup  # or: python -m playwright install chromium

Usage

Run the crawler

# Default: ~/workspace/finviz/, 7-day expiry
python3 scripts/finviz_crawler.py

# Custom paths and settings
python3 scripts/finviz_crawler.py --db /path/to/finviz.db --articles-dir /path/to/articles/

# Keep 30 days of articles
python3 scripts/finviz_crawler.py --expiry-days 30

# Never auto-delete (keep everything)
python3 scripts/finviz_crawler.py --expiry-days 0

# Custom crawl interval (default: 300s)
python3 scripts/finviz_crawler.py --sleep 600

Query articles

# Last 24 hours of headlines
python3 scripts/finviz_query.py --hours 24

# Titles only (compact, good for LLM summarization)
python3 scripts/finviz_query.py --hours 12 --titles-only

# With full article content
python3 scripts/finviz_query.py --hours 12 --with-content

# List downloaded articles with content status
python3 scripts/finviz_query.py --list-articles --hours 24

# Database stats
python3 scripts/finviz_query.py --stats

Manage tickers

# List all tracked tickers
python3 scripts/finviz_query.py --list-tickers

# Add single ticker (auto-generates keywords from symbol)
python3 scripts/finviz_query.py --add-ticker NVDA

# Add with custom keywords
python3 scripts/finviz_query.py --add-ticker "NVDA:nvidia,jensen huang"

# Add multiple tickers (batch)
python3 scripts/finviz_query.py --add-ticker NVDA TSLA AAPL
python3 scripts/finviz_query.py --add-ticker "NVDA:nvidia,jensen" "TSLA:tesla,elon musk"

# Remove tickers (batch)
python3 scripts/finviz_query.py --remove-ticker NVDA TSLA

# Custom DB path
python3 scripts/finviz_query.py --list-tickers --db /path/to/finviz.db

Tickers are stored in the tickers table inside finviz.db alongside articles. The crawler reads this table each cycle to know which ticker pages to scrape.

Configuration

Setting CLI flag Env var Default
Database path --db ~/workspace/finviz/finviz.db
Articles directory --articles-dir ~/workspace/finviz/articles/
Crawl interval --sleep 300 (5 min)
Article expiry --expiry-days FINVIZ_EXPIRY_DAYS 7 days
Timezone FINVIZ_TZ or TZ System default

💬 Chat Commands (OpenClaw Agent)

When this skill is installed, the agent recognizes /finviz as a shortcut:

Command Action
/finviz list Show tracked tickers
/finviz add NVDA, TSLA Add tickers to track
/finviz remove NVDA Remove a ticker
/finviz stats Show article/ticker counts
/finviz help Show available commands

The agent runs these via the finviz_query.py CLI internally.

📱 PrivateApp Dashboard

A companion mobile dashboard is available in PrivateApp — a personal PWA dashboard for your home server.

The Finviz app provides:

  • Headlines browser with time-range filters (12h / 24h / Week)
  • Ticker-specific news filtering
  • LLM-powered summaries on demand

Install PrivateApp, and the Finviz dashboard is built-in — no extra setup needed.

Architecture

Crawler daemon (finviz_crawler.py):

  • Crawls finviz.com/news.ashx headlines every 5 minutes
  • Fetches article content via Crawl4AI (Playwright) or RSS (paywalled sites)
  • Bot/paywall detection rejects garbage content
  • Per-domain rate limiting, user-agent rotation
  • Deduplicates via SHA-256 title hash
  • Auto-expires old articles (configurable)
  • Clean shutdown on SIGTERM/SIGINT

Query tool (finviz_query.py):

  • Read-only SQLite queries (no HTTP, stdlib only)
  • Filter by time window, export titles or full content
  • Designed for LLM summarization pipelines

Run as a service (optional)

systemd (Linux)

[Unit]
Description=Finviz News Crawler

[Service]
ExecStart=python3 /path/to/scripts/finviz_crawler.py --expiry-days 30
Restart=on-failure
RestartSec=30

[Install]
WantedBy=default.target

launchd (macOS)

\x3C?xml version="1.0" encoding="UTF-8"?>
\x3C!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
\x3Cplist version="1.0">
\x3Cdict>
    \x3Ckey>Label\x3C/key>\x3Cstring>com.finviz.crawler\x3C/string>
    \x3Ckey>ProgramArguments\x3C/key>
    \x3Carray>
        \x3Cstring>python3\x3C/string>
        \x3Cstring>/path/to/scripts/finviz_crawler.py\x3C/string>
        \x3Cstring>--expiry-days\x3C/string>
        \x3Cstring>30\x3C/string>
    \x3C/array>
    \x3Ckey>RunAtLoad\x3C/key>\x3Ctrue/>
    \x3Ckey>KeepAlive\x3C/key>\x3Ctrue/>
\x3C/dict>
\x3C/plist>

Data layout

~/workspace/finviz/
├── finviz.db          # SQLite: articles + tickers (single DB)
├── articles/          # Full article content as .md files
│   ├── market/        # General market headlines
│   ├── nvda/          # Per-ticker articles
│   └── tsla/
└── summaries/         # LLM summary cache (.json)

Cron integration

Pair with an OpenClaw cron job for automated digests:

Schedule: 0 6 * * * (6 AM daily)
Task: Query last 24h → LLM summarize → deliver to Matrix/Telegram/Discord
安全使用建议
What to consider before installing: - Review crawl4ai behaviour: the crawler imports and uses the 'crawl4ai' SDK. That library may perform remote requests or forward scraped HTML to a hosted scraping service. If you need scraped content to remain local, inspect crawl4ai's docs/source or run the project after replacing crawl4ai usage with a local-only Playwright solution. - Run install in a controlled environment: the installer runs pip installs and downloads Playwright browsers. Use a Python virtual environment (venv) or container to avoid polluting your system Python and to contain network activity. - Inspect scripts before running: scripts/install.py writes service files and enables a user-level systemd/launchd service and creates files under ~/Downloads/Finviz (or other configured paths). The query script can delete article files and DB rows when removing tickers—back up anything important. - Check defaults and paths: SKILL.md and scripts disagree on default paths (~/workspace/finviz vs ~/Downloads/Finviz). Confirm and set explicit --db / --articles-dir options to ensure data goes where you expect. - If you need stronger privacy control: consider disabling automatic service creation, run the crawler manually on demand, or modify the code to use only local Playwright/browser automation (and confirm no third-party endpoints are contacted). - Network and legal considerations: scraping sites may violate terms of service. The code attempts to respect robots.txt and rate limits, but you should ensure compliance with any sites you scrape. If you want, I can: (1) point to the code locations that call crawl4ai for you to inspect further, (2) suggest a safe set of edits to force local-only crawling, or (3) produce commands to run the installer inside a venv and verify network activity during a test run.
功能分析
Type: OpenClaw Skill Name: finviz-crawler Version: 3.0.0 The skill is designed for legitimate financial news crawling and storage. However, a significant path traversal vulnerability exists in `scripts/finviz_query.py` within the `remove_tickers` function. If a user adds a ticker with path traversal sequences (e.g., `../../../etc`) and then attempts to remove it, the `shutil.rmtree` call could lead to the deletion of arbitrary directories on the system. This is a critical vulnerability allowing for destructive actions, classifying the skill as suspicious rather than benign. No clear evidence of intentional malicious behavior like data exfiltration or unauthorized remote code execution was found.
能力评估
Purpose & Capability
The code and SKILL.md implement a local crawler + SQLite query tool as advertised (crawler, article files, DB, service support). Required binary (python3) is appropriate. Minor inconsistencies exist in defaults (SKILL.md mentions ~/workspace/finviz while scripts use ~/Downloads/Finviz), but overall the requested capabilities (pip packages, Playwright browsers) align with the crawler purpose.
Instruction Scope
Runtime instructions (and the included install.py) instruct the agent / user to run scripts that install packages, download Playwright browsers, create user systemd/launchd service files, and read/write files under the user's home. The code also reads environment variables (FINVIZ_EXPIRY_DAYS, FINVIZ_TZ, FINVIZ_TICKERS) that are not declared in the skill metadata. The crawler and query tools perform deletion of local files/DB rows (remove-ticker), which is expected for management but worth highlighting as a destructive operation.
Install Mechanism
There is no packaged install spec; installation relies on running scripts/install.py which uses pip to install packages and runs crawl4ai/playwright installers. This is a typical pattern for Python projects; it does not download arbitrary archives from unknown URLs. Playwright/browser installs are heavier operations (download Chromium). The install script also runs systemctl/launchctl commands to enable services.
Credentials
The skill does not request credentials or declared env vars, yet the code reads and uses several environment variables (FINVIZ_EXPIRY_DAYS, FINVIZ_TZ, TZ, FINVIZ_TICKERS) without listing them in metadata. More importantly, the crawler uses the third‑party 'crawl4ai' library/SDK: depending on that library's design, fetched pages or page metadata may be transmitted to remote services (privacy/exfiltration risk). No secrets are requested, but network transmission of scraped content to a third party is a meaningful proportionality/privacy concern for a local crawler.
Persistence & Privilege
The installer creates user-level persistent services (systemd user unit or launchd plist) and attempts to enable them (systemctl --user enable). This grants persistent background execution of the crawler under the user account. The skill does not request 'always: true' and does not modify other skills' configs, but creating and enabling a persistent service is a notable privilege and operational effect the user should be aware of.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install finviz-crawler
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /finviz-crawler 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.0.0
Ticker crawling and management
v2.0.0
Continuous financial news crawler. No API keys.
元数据
Slug finviz-crawler
版本 3.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 2
常见问题

finviz-crawler 是什么?

Continuous financial news crawler for finviz.com with SQLite storage, article extraction, and query tool. Use when monitoring financial markets, building new... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 672 次。

如何安装 finviz-crawler?

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

finviz-crawler 是免费的吗?

是的,finviz-crawler 完全免费(开源免费),可自由下载、安装和使用。

finviz-crawler 支持哪些平台?

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

谁开发了 finviz-crawler?

由 camopel(@camopel)开发并维护,当前版本 v3.0.0。

💬 留言讨论