Skip to content

Repository files navigation

Potatoswap Launchpad Monitor

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.

Features

  • 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.

Setup

  1. Install Dependencies:

    pip install -r requirements.txt
    
  2. 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
      }
  3. Run the Script:

    python main.py
    

Modules

  • 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.

Behavior

  • 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.

Requirements

  • Python 3.6+
  • requests
  • beautifulsoup4

For JS-rendered pages, install Playwright: pip install playwright and modify fetcher.py accordingly.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages