Build a price tracker with Crawlee and Apify
Описание и применение
Создайте автоматический трекер цен, используя Crawlee и Apify: скрипт на Python, который парсит страницу товара, сохраняет данные и отправляет email‑уведомления при снижении цены ниже заданного порога.
Задача
Need to monitor product price and receive alerts when it drops below a threshold.
Результат
The workflow produces a fully functional price tracker that automatically scrapes a product page, stores data, and sends email alerts when the price drops below a user-defined 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
- Test the scraper with
apify run --purgeand verify JSON output - Add price threshold logic and call Apify’s Send Email Actor when price < threshold
- Configure APIFY_API_TOKEN via
apify login - Run the Actor locally to confirm email alerts
- Push the Actor to Apify Cloud with
apify push - Update Actor settings (Start URLs, email) and start the run
- Export scraped data in CSV/Excel/JSON from the Actor output
Доказательства
Install the Apify CLI. You can do this using either Homebrew or NPM with the following commands: brew install apify-cli npm -g install apify-cli
Define a price thresholdprice_threshold = 80… if data['price'] < price_threshold: actor_run = await Actor.start( actor_id="apify/send-mail", …
- Дата записи: 2026-09-07T10:32:17.052Z