Skip to content

h9-tec/Price_tracking_agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-commerce Product Tracker

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.

Features

  • πŸ” 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

Installation

  1. Clone the repository:
git clone https://github.com/h9-tec/Price_tracking_agents.git
cd Price_tracking_agents
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the package in development mode:
pip install -r requirements.txt
pip install -e .
  1. 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

Usage

Command Line Interface

Track a product using the command-line tool:

ecommerce-tracker "product name" -s site.com

Example:

ecommerce-tracker "iphone 15" -s noon.com

Options

  • -s, --sites: Specify e-commerce sites to check (can be multiple)
  • -o, --output-dir: Directory to save reports (default: 'reports')

Output

The tool generates:

  • Excel report with product details
  • Screenshots of product listings
  • Console output with real-time progress

Features in Detail

Visual Validation

  • Takes screenshots of product listings
  • Saves visual evidence of prices and availability
  • Helps verify data accuracy

Price Tracking

  • Extracts current prices
  • Handles different price formats
  • Supports multiple currencies

Product Information

  • Product name
  • Price
  • Availability status
  • Seller rating
  • Additional product details

Browser Automation

  • Intelligent navigation
  • Popup handling
  • Scroll management
  • Multi-language support

Development

Project Structure

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

Adding New Features

  1. 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
  1. Add the tool to the agent:
agent = CodeAgent(
    tools=[existing_tools, your_new_tool],
    model=model,
    step_callbacks=[save_screenshot],
    max_steps=15
)

Requirements

  • Python 3.8+
  • Chrome browser
  • Internet connection
  • Fireworks AI API key
  • Required Python packages (see requirements.txt)

License

MIT License

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Acknowledgments

  • Built with smolagents
  • Uses Fireworks AI for vision-language processing
  • Selenium and Helium for browser automation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages