Files
pokemon-stock-checker/chrome-extension
mmcghen 8d382e723f feat: Implement Walmart scraper and integrate with existing architecture
- Added Walmart scraper to scrape product data from Walmart.com, including category pages and product details.
- Introduced a stealth browser module to handle bot protection and improve scraping reliability.
- Created a SQLite database for tracking product history, price changes, stock events, and user favorites.
- Developed a Discord bot for user interaction, allowing location setting and stock checking at local stores.
- Implemented a favorites system to manage priority products and categories with custom notification settings.
- Added news aggregation module to fetch and analyze Pokemon TCG news from various sources.
- Created tools for API discovery and monitoring, including a backend monitor for detecting new products.
- Added unit tests for database operations, product filtering, and API endpoints to ensure functionality.
- Enhanced existing modules with improved error handling and logging for better maintainability.
2026-03-27 23:08:09 -04:00
..

Pokemon Stock Monitor - Chrome Extension

A Chrome extension that monitors PokemonCenter for stock changes and sends Discord notifications.

Why a Chrome Extension?

PokemonCenter uses Imperva bot protection that blocks automated browsers (Playwright, Selenium). This extension runs inside your real Chrome browser, making it undetectable - to the website, it looks exactly like you browsing manually.

Installation

  1. Add Icons (optional but recommended):

    • Create or download three PNG icons: icon16.png, icon48.png, icon128.png
    • Place them in this folder
    • You can use any Pokemon-themed icons or simple colored squares
  2. Load the Extension:

    • Open Chrome and go to chrome://extensions
    • Enable "Developer mode" (toggle in top right)
    • Click "Load unpacked"
    • Select this chrome-extension folder
    • The extension icon should appear in your toolbar
  3. Configure:

    • Click the extension icon
    • Paste your Discord webhook URL
    • Add URLs to monitor (default is PokemonCenter TCG)
    • Set check interval (1-60 minutes)
    • Click "Save Settings"

How It Works

  1. Background Service Worker: Runs continuously in Chrome
  2. Periodic Checks: Uses Chrome's alarm API to check at your interval
  3. Product Parsing: Fetches pages and parses product data from HTML
  4. Change Detection: Compares against known products to detect:
    • New product listings
    • Restocks (was out of stock, now in stock)
  5. Discord Notifications: Sends rich embeds with product info and direct links

Features

  • Keyword Filtering: Only track products matching specific keywords
  • New Product Alerts: Get notified when new items appear
  • Restock Alerts: Get notified when out-of-stock items return
  • Browser Notifications: Local notifications in addition to Discord
  • Persistent Storage: Remembers products across browser restarts

Tips

  • Keep Chrome Running: The extension only works while Chrome is open
  • First Run: After installing, click "Check Now" to do an initial scan
  • Clear History: Use this if you want to re-detect all products as "new"
  • Multiple URLs: Add one URL per line in the URLs field

Troubleshooting

No notifications sending:

  • Check that your Discord webhook URL is correct
  • Make sure "Monitor Enabled" is toggled on
  • Check Chrome's console for errors (right-click extension → Inspect popup)

Extension not loading:

  • Make sure manifest.json is valid JSON
  • Check for any icon files referenced but missing

Products not detected:

  • PokemonCenter may have changed their HTML structure
  • Check the browser console for parsing errors