Skip to main content

Case Study 10: E-commerce Price Tracker & Alert Engine (Challenge)

:::info Challenge — no solution provided This is an open challenge, in the same style as Case Study 7. Design your own solution and use the suggested libraries as a starting point rather than a strict requirement. :::

Scenario​

A growth team wants to track competitor product prices over time and be notified automatically when a price drops below a set threshold. Your task is to build a scraper-based tracker that stores historical price data and triggers alerts.

Suggested Libraries​

  • requests
  • BeautifulSoup
  • sqlite3
  • time

Sample Files You May Create​

  • tracked_products — a configured list of products and thresholds
  • price_history — the stored time-series of observed prices

Requirements​

  • Fetch product pages for a configured list of products.
  • Extract the current price from each page.
  • Store every price observation with a timestamp for trend analysis.
  • Compare the current price against a configured threshold.
  • Trigger an alert when a price drops below its threshold.
  • Handle missing or changed page structure gracefully.
  • Add a delay between requests to scrape responsibly.

Things to think about​

  • What should your script do if a retailer changes their page layout and your price selector suddenly matches nothing?
  • Storing every price observation (not just the latest) opens up more than alerting — what else could you build on top of that history?