telegram-scraper-run
Automatic Telegram scraping
What this skill does
# Telegram Scraper Run
> Runs the Telegram Scraper Agent manually for testing or unscheduled scanning.
## When to use
- "run telegram scraper"
- "scan telegram channels"
- "find new channels with AI"
- "check competitors on Telegram"
## Input
Optional:
- `--dry-run` - test run without notifications
- `--category <name>` - scan only one category (competitors/industry/advertising)
- `--no-messages` - skip reading messages (faster)
- `--notify-test` - notification test only
## How to execute
### Full run (production)
```bash
cd $AGENTS_PATH/telegram-scraper
python3 telegram_scraper_agent.py
```
### Dry-run tests
```bash
# Test without notifications
python3 telegram_scraper_agent.py --dry-run
# Single category
python3 telegram_scraper_agent.py --category competitors --dry-run
# Without reading messages (faster)
python3 telegram_scraper_agent.py --no-messages --dry-run
```
### Notification test
```bash
python3 telegram_scraper_agent.py --notify-test
```
### Unit tests
```bash
python3 test_telegram_scraper.py
```
## Output
Agent outputs:
1. Progress to stderr (channel scanning)
2. Summary to stdout (results from Claude)
3. Telegram notification (if high-value channels found)
Data is saved to:
```
$PROJECT_ROOT/data/telegram_scraper/
├── YYYY-MM-DD/ # Dated results
│ ├── competitors_channels.json
│ ├── competitors_ad_contacts.csv
│ ├── industry_channels.json
│ ├── advertising_channels.json
│ └── messages/
└── latest/ # Symlinks to most recent
```
## Checking results
```bash
# Latest results
ls -l $PROJECT_ROOT/data/telegram_scraper/latest/
# Top 5 channels (competitors)
cat $PROJECT_ROOT/data/telegram_scraper/latest/competitors_channels.json | jq '.[0:5]'
# Ad contacts
cat $PROJECT_ROOT/data/telegram_scraper/latest/competitors_ad_contacts.csv
# Agent log
cat $PROJECT_ROOT/data/telegram_scraper/agent_log.json | jq '.[-5:]'
```
## Configuration
Edit config:
```bash
code $PROJECT_ROOT/data/telegram_scraper_config.json
```
Config structure:
```json
{
"categories": {
"competitors": {
"keywords": ["annotation", "data labeling", "cvat"],
"exclude": ["spam", "crypto"],
"scan_posts": 10
}
},
"min_subscribers": 100,
"min_score": 10,
"notification_threshold": 30
}
```
## Launchd Schedule
Agent runs automatically twice daily (9:00, 18:00).
```bash
# Check status
launchctl list | grep telegram-scraper
# Load schedule
launchctl load ~/Library/LaunchAgents/com.yourcompany.telegram-scraper.plist
# Unload schedule
launchctl unload ~/Library/LaunchAgents/com.yourcompany.telegram-scraper.plist
# View logs
tail -f $GOOGLE_TOOLS_PATH/logs/telegram_scraper.log
tail -f $GOOGLE_TOOLS_PATH/logs/telegram_scraper.err
```
## Troubleshooting
### Session Expired Error
If Telegram session is invalid:
```bash
# Refresh session
cd $TG_TOOLS_PATH
python3 -m tg_utils.auth
```
### No Results
- Check keywords in config (too specific?)
- Verify session: `cd $TG_TOOLS_PATH && python3 -m tg_utils.auth`
- Run with `--dry-run` for debug
### Rate Limited
- Normal: agent waits and retries
- FloodWaitError > 5 min: channel skipped
- Solution: decrease `scan_posts` in config
## Manual Scraping (without the agent)
If the agent is not working:
```bash
cd $TG_TOOLS_PATH/tools
# Find channels with ad contacts
python3 tg_scrape.py ads --keywords "annotation,labeling" --posts 10
# List channels
python3 tg_scrape.py channels --keywords "ai,ml" --output channels.csv
# Read messages
python3 tg_scrape.py messages "Channel Name" --days 7 --limit 50
```
## Next steps
After scraping:
1. **Add contacts to CRM**: use `add-lead` skill
2. **Write outreach**: use `telegram-send` skill
3. **Adjust config**: edit config file and re-run
## Related skills
- `telegram-session` - update Telegram session
- `add-lead` - add found contacts to CRM
- `telegram-send` - message ad contacts
- `daily-briefing` - include findings in morning briefing
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.