Under Construction
Back to projects

E-commerce Stock Tracker

Intelligent automation system for monitoring product availability across multiple e-commerce platforms with real-time notifications and advanced detection strategies.

Python Playwright Web Automation Telegram Bot API Real-time Monitoring Beautiful Soup

Project Overview

This project automates the tedious task of monitoring product availability on multiple Indonesian e-commerce platforms. Originally developed to track iPhone 17 Pro Max availability, the system monitors stock across iBox, Digimap, Eraspace, and Hellostore.

The system runs 24/7, checking product availability at configurable intervals and sends instant Telegram notifications when items become available, giving users a competitive advantage in securing limited stock items.

Key Features

🎯

Multi-Platform Monitoring

Simultaneously tracks stock across 4 major e-commerce platforms (iBox, Digimap, Eraspace, Hellostore) with platform-specific detection strategies.

🤖

Stealth Browser Automation

Uses Playwright with stealth mode to bypass anti-bot detection, mimicking real user behavior with proper headers and delays.

📱

Instant Telegram Alerts

Real-time notifications via Telegram Bot API with product details, availability status, and direct purchase links.

🧠

Intelligent Detection

Multiple fallback strategies for stock detection including button state analysis, inventory quantity checking, and HTML parsing.

📊

Comprehensive Logging

Detailed activity logs with timestamps, status changes, and hourly monitoring reports for tracking system uptime and performance.

🔄

Auto-Recovery System

Automatic error handling and browser restart on failures, ensuring continuous monitoring even during network issues or site changes.

Technical Implementation

Architecture

Browser Automation

Playwright framework with Chromium in headless mode, implementing stealth techniques to avoid detection by anti-bot systems. Custom user agents, viewport settings, and natural timing delays.

Detection Strategies

Multi-layered approach: (1) Button visibility and state checking, (2) Hidden inventory quantity extraction, (3) Add-to-cart button analysis, (4) Text-based stock indicators with fallback mechanisms.

Data Extraction

Beautiful Soup for HTML parsing combined with Playwright's native selectors. JSON data extraction from embedded script tags for accurate stock information.

Notification System

Telegram Bot API integration with formatted markdown messages. Status change detection prevents notification spam while ensuring alerts for availability changes.

Supported Platforms

iBox.co.id

Full automation with auto-login, variant selection, and stock detection

Digimap.co.id

Stealth mode monitoring with button state and inventory checking

Eraspace.com

JSON-based stock detection with SKU-specific variant tracking

Hellostore.com

Multi-product monitoring with shared browser instance for efficiency

Challenges & Solutions

Anti-Bot Detection

Challenge: E-commerce sites use Cloudflare and anti-bot systems to block automated access.

Solution: Implemented Playwright Stealth with custom user agents, natural timing delays, and browser fingerprint manipulation to mimic human behavior.

Dynamic Content Loading

Challenge: Product availability data loads asynchronously via JavaScript, making simple HTTP requests insufficient.

Solution: Used full browser automation with proper wait strategies and JavaScript execution monitoring to ensure complete page rendering.

Platform-Specific Variations

Challenge: Each e-commerce platform uses different HTML structures and stock indication methods.

Solution: Created platform-specific checker classes with customized detection strategies and multiple fallback mechanisms for reliability.

Results & Impact

4
Platforms Monitored
24/7
Uptime Monitoring
<30s
Alert Response Time
95%
Detection Accuracy

The system successfully runs for extended periods with minimal intervention, providing competitive advantage in securing limited stock items. Hourly status reports ensure system health monitoring and provide peace of mind for 24/7 operation.

Technologies Used

Python 3.7+ Playwright Playwright Stealth Beautiful Soup Requests Telegram Bot API JSON Parsing HTML Parsing Error Handling Logging

Interested in Automation Solutions?

I can help you build custom automation systems for your specific needs.

Get in Touch View More Projects