Files
stock-info-crawler/.env.template
MH Hung f708f3bf1d feat: add OpenInsider Top-of-day crawler and multi-CRAWLER_TYPE support
New crawler: app/crawlers/openinsider_top.py\n- Scrapes three pages (sales/purchases/officer purchases)\n- Filters rows with Value/Amount >= ,000,000 (configurable via INSIDER_MIN_AMOUNT)\n- Builds concise notifications; saves to data/openinsider_top.json

Runner: support comma-separated CRAWLER_TYPE and new openinsider_top type\n- Accepts e.g., CRAWLER_TYPE=openinsider_top,openinsider,barrons\n- Preserves order, removes duplicates; warns on unknown types\n- Uses shared schedule: RUN_DAILY_AT or CHECK_INTERVAL; initial run per crawler

Entrypoint: rename enhanced_crawler.py -> main.py\n- Update Dockerfile CMD and README references

Config & docs:\n- Reorganize .env.template into clear sections with examples\n- Update .env with multi-crawler example and INSIDER_MIN_AMOUNT\n- README: document new crawler, usage, and multi-type CRAWLER_TYPE
2025-09-09 21:17:50 +08:00

56 lines
1.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#############################
# 基本設定(排程與日誌)
#############################
# 每 N 秒檢查一次(若設定 RUN_DAILY_AT 則忽略)
CHECK_INTERVAL=300
# 每天固定時間檢查(例如 12:00若不需固定時間請保留此值或註解
RUN_DAILY_AT=12:00
# 日誌等級DEBUG | INFO | WARNING | ERROR
LOG_LEVEL=INFO
# 啟動後第一次是否也發送目前清單true/false
ALWAYS_NOTIFY_ON_STARTUP=false
#############################
# 通知設定(擇一或多個)
#############################
# Email範例以 Gmail
EMAIL_SMTP_SERVER=smtp.gmail.com
EMAIL_SMTP_PORT=587
# 可選: starttls | ssl | none
EMAIL_SMTP_SECURITY=starttls
EMAIL_FROM=your_email@gmail.com
EMAIL_TO=notification@gmail.com
EMAIL_USERNAME=your_email@gmail.com
EMAIL_PASSWORD=your_app_specific_password
# Slack Webhook可選
WEBHOOK_URL=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
# Discord Webhook可選
DISCORD_WEBHOOK=https://discord.com/api/webhooks/YOUR/DISCORD/WEBHOOK
#############################
# 進階:資料與日誌路徑(可選)
#############################
# Docker 預設 /app/data、/app/logs本機預設 ./data、./logs
# DATA_DIR=./data
# LOG_DIR=./logs
#############################
# 爬蟲選擇與參數
#############################
# 可選barrons | openinsider | openinsider_top
# 可逗號同時啟多個(例如同時跑三種):
# CRAWLER_TYPE=openinsider_top,openinsider,barrons
CRAWLER_TYPE=openinsider
# OpenInsider依個別股票查詢
# - 單一標的使用 SYMBOL
# - 多個標的使用 SYMBOLS以逗號分隔
SYMBOL=PLTR
# SYMBOLS=PLTR,NVDA,TSLA
# OpenInsider 當日大額(三頁合併)
# - 金額門檻(整數,單位:美元),僅通知 >= 該金額的交易
# INSIDER_MIN_AMOUNT=1000000