An intelligent e-commerce product tracking tool that uses vision-language models and browser automation to track prices and product information across various e-commerce sites.
- π Automated product search across e-commerce platforms
- πΈ Visual validation with screenshots
- π° Price tracking and comparison
- π Detailed product information extraction
- π Excel report generation
- π Multi-language support (including Arabic)
- π€ AI-powered navigation and data extraction
- Clone the repository:
git clone https://github.com/h9-tec/Price_tracking_agents.git
cd Price_tracking_agents
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the package in development mode:
pip install -r requirements.txt
pip install -e .
- Create a
.env
file in the project root with your API keys:
FIREWORKS_API_KEY=your_fireworks_api_key
OPENAI_API_KEY=your_openai_api_key
NOON_URL=https://www.noon.com
Track a product using the command-line tool:
ecommerce-tracker "product name" -s site.com
Example:
ecommerce-tracker "iphone 15" -s noon.com
-s
,--sites
: Specify e-commerce sites to check (can be multiple)-o
,--output-dir
: Directory to save reports (default: 'reports')
The tool generates:
- Excel report with product details
- Screenshots of product listings
- Console output with real-time progress
- Takes screenshots of product listings
- Saves visual evidence of prices and availability
- Helps verify data accuracy
- Extracts current prices
- Handles different price formats
- Supports multiple currencies
- Product name
- Price
- Availability status
- Seller rating
- Additional product details
- Intelligent navigation
- Popup handling
- Scroll management
- Multi-language support
track/
βββ src/
β βββ ecommerce_tracker/
β β βββ __init__.py
β β βββ ecommerce_tracker.py
β β βββ browser_manager.py
β β βββ price_tracker_agent.py
β βββ __init__.py
β βββ cli.py
βββ requirements.txt
βββ setup.py
βββ README.md
- Tool Functions:
@tool
def your_new_tool(param: str) -> str:
"""Your tool description.
Args:
param: Parameter description
Returns:
str: Return value description
"""
# Tool implementation
return result
- Add the tool to the agent:
agent = CodeAgent(
tools=[existing_tools, your_new_tool],
model=model,
step_callbacks=[save_screenshot],
max_steps=15
)
- Python 3.8+
- Chrome browser
- Internet connection
- Fireworks AI API key
- Required Python packages (see requirements.txt)
MIT License
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
- Built with smolagents
- Uses Fireworks AI for vision-language processing
- Selenium and Helium for browser automation