Build a price tracker with Crawlee for Python and Apify
Описание и применение
Создайте автоматический скрипт на Python с Crawlee и Apify, который извлекает название и цену продукта с веб‑страницы, сохраняет данные и отправляет электронное письмо, если цена упала ниже заданного порога.
Задача
Need to monitor product price and receive alerts when it drops below a threshold.
Результат
The workflow produces a fully functional price tracker that scrapes a product page, stores data, and sends email alerts when the price drops below a set threshold.
Рабочий процесс
- Install Apify CLI via Homebrew or NPM
- Create a new Actor using the Python + Crawlee + BeautifulSoup template
- Open src/main.py and replace start_urls with target product URL
- Modify request_handler to extract product name and price using CSS selectors
- Run apify run --purge to test extraction
- Add price_threshold variable and call Apify’s Send Email Actor when price < threshold
- Configure APIFY_API_TOKEN via apify login
- Run apify run --purge to test email alert
- Push Actor to Apify Platform with apify push
- Update Actor settings (Start URLs) and start the Actor
- Export data in desired formats
Доказательства
Run apify run --purge and check if you get a similar output as the example below: { "url": "https://www.centralcomputer.com/raspberry-pi-5-8gb-ram-board.html", "product_name": "Raspberry Pi 5 8GB RAM Board", "price": 79.99}
Replace the placeholder email address with your actual email, the one where you want to receive notifications.
- Дата записи: 2026-09-15T18:30:16.100Z