Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

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