Monitors press releases from major tech company IR pages and GlobeNewswire RSS feeds for a watchlist of ~80 tickers. Each article is sent to Claude Haiku, which classifies it as an investment or partnership signal and outputs a BUY / WATCH / IGNORE recommendation. Actionable results are pushed to Telegram.
Scraper → AI Analyzer → Log → Mark seen → Telegram notify
Two scraper patterns:
- HTML scrapers (
scrapers/nvda_scraper.py,msft_scraper.py, etc.) — extendBaseScraper, scrape company IR pages directly - GlobeNewswire (
scrapers/globenewswire_scraper.py) — reads 3 RSS feeds, filters entries by matching tickers againstWATCHLIST, fetches body only for matches
See CLAUDE.md for full architecture details.
Set these as Windows User environment variables (System Properties → Advanced → Environment Variables):
ANTHROPIC_API_KEY
TELEGRAM_BOT_TOKEN
TELEGRAM_CHAT_ID
pip install -r requirements.txtCreate via Task Scheduler (full "Create Task" dialog, not the basic wizard):
- Trigger: Weekly, Mon–Fri, start 14:00, repeat every 30 minutes for 8 hours (stops at 22:00)
- Action:
- Program:
cmd.exe - Arguments:
/c python -X utf8 "C:\Users\stefa\source\ScrapeBot\main.py" >> "C:\Users\stefa\source\ScrapeBot\cron.log" 2>&1 - Start in:
C:\Users\stefa\source\ScrapeBot
- Program:
- Settings: "If already running, do not start a new instance"
python -X utf8 main.py # full pipeline
python -X utf8 Tester.py # GlobeNewswire scraper only, ignores seen_urls-X utf8 is required on Windows — without it, emoji print statements raise UnicodeEncodeError when output is redirected to a file.
| Path | Purpose |
|---|---|
main.py |
Orchestrates the full pipeline |
config.py |
All settings: API keys, file paths, HTTP headers |
scrapers/ |
One file per company + base_scraper.py + GlobeNewswire |
ai/analyzer.py |
Sends article to Claude Haiku, returns structured dict |
ai/prompts.py |
System prompt and user prompt builder — tune AI behavior here |
storage/seen_urls.py |
Deduplication: tracks every URL ever processed |
storage/log.py |
Append-only logs for releases and Telegram notifications |
notifications/telegram.py |
Sends Telegram messages |
data/ |
Runtime state (gitignored) — seen URLs, release log, notification log |
cron.log |
Runtime output log (gitignored) — trimmed automatically at 1 MB |
- AI classification logic — edit
ai/prompts.py(system prompt + JSON schema). Do not touchai/analyzer.pyfor prompt changes. - Ticker watchlist — edit
WATCHLISTat the top ofscrapers/globenewswire_scraper.py - Add a new company scraper — create
scrapers/yourco_scraper.pyextendingBaseScraper, implementparse_press_releases()andfetch_article_body(), then register the instance inmain.py
storage/log.pyrewrites the entirereleases_log.jsonon every append — will get slow if the file grows large. Worth switching to newline-delimited JSON if needed.- Commented-out test code at the bottom of
config.pyis dead — safe to delete.