Never miss a price drop again
Get emailed when a product price falls below your target
What you will receive
Price Alert: Sony WH-1000XM5
just now
The price dropped! Previous: $399.99 Now: $279.99 (30% off) View product →
How it works
- 1Humrun visits the product page on your schedule
- 2It extracts the current price and compares it to the last check
- 3If the price changed, you get an email with both prices
You configure
https://amazon.com/dp/B09XS7JWHH
The URL of the product page to monitor
.price
CSS selector if auto-detection fails
View Python code
import requests
from bs4 import BeautifulSoup
from state import state
import os
PRODUCT_URL = os.environ.get("PRODUCT_URL")
PRICE_SELECTOR = os.environ.get("PRICE_SELECTOR", ".price")
response = requests.get(PRODUCT_URL, headers={"User-Agent": "Mozilla/5.0"})
soup = BeautifulSoup(response.text, "html.parser")
price_elem = soup.select_one(PRICE_SELECTOR)
current_price = price_elem.get_text(strip=True) if price_elem else None
if not current_price:
print("Could not find price on page")
else:
previous_price = state.get("price")
state["price"] = current_price
if previous_price is None:
print(f"First run - recorded price: {current_price}")
elif current_price != previous_price:
raise Exception(f"Price changed: {previous_price} → {current_price}")
else:
print(f"Price unchanged: {current_price}")Humrun remembers the last price between runs so it can detect changes.
Suggested schedule: Every hour•Notifications: When an alert is triggered