This modular Python script monitors the Potatoswap launchpad page (https://potatoswap.finance/launchpad) using snapshot comparison. It detects when the "Coming Soon" text disappears or changes, sending an immediate Telegram alert. If no changes occur, it sends periodic status updates every 5 hours while the page remains in "Coming Soon" state.
- Snapshot Comparison: Saves and compares full HTML snapshots to detect any changes.
- Modular Structure: Separated into fetcher, comparator, notifier, storage, and configuration modules.
- Telegram Notifications: Sends alerts for live status and periodic updates.
- Error Handling: Includes logging and network error handling.
- Configurable: Uses JSON config for Telegram credentials and intervals.
-
Install Dependencies:
pip install -r requirements.txt -
Configure Telegram:
- Obtain a bot token from @BotFather on Telegram.
- Get your chat ID (send a message to your bot and check
https://api.telegram.org/bot<TOKEN>/getUpdates). - Edit
config.json:{ "telegram_bot_token": "YOUR_BOT_TOKEN", "chat_id": "YOUR_CHAT_ID", "check_interval_seconds": 600, "status_interval_hours": 1 }
-
Run the Script:
python main.py
fetcher.py: Handles HTML fetching using requests (fallback to Playwright if needed for JS-rendered pages).comparator.py: Compares HTML snapshots via hashing and checks for "Coming Soon" text.notifier.py: Sends messages via Telegram Bot API.storage.py: Saves and loads HTML snapshots to/from files.main.py: Orchestrates the monitoring loop with logging.
- On first run, saves a baseline snapshot.
- Continuously fetches the page at configured intervals.
- Detects changes by comparing hashes.
- Sends live alert only once when "Coming Soon" disappears.
- Sends status updates every 5 hours if still "Coming Soon" and no changes.
- Python 3.6+
requestsbeautifulsoup4
For JS-rendered pages, install Playwright: pip install playwright and modify fetcher.py accordingly.