Skip to content

skymagi-d/marketplace-scraping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Marketplace Scraping Tool

This tool automates the process of scraping product information from major e-commerce marketplaces (Amazon Brazil and Mercado Livre). It helps users compare product prices and details across these platforms based on specific search criteria.

Features

  • Scrapes product information from:
    • Amazon Brazil
    • Mercado Livre
  • Automated login functionality
  • Product matching based on codes and names
  • Price comparison against reference prices
  • Automated screenshot capture of product pages
  • Results export to Excel spreadsheet

Requirements

  • Python 3.x
  • Selenium WebDriver
  • Chrome browser
  • Required Python packages:
    • selenium
    • openpyxl

Project Structure

marketplace-scraping/
├── Amazon/
│   ├── amazon.py    # Amazon scraping script
│   ├── func.py      # Helper functions
│   └── run.bat      # Batch file to run Amazon scraper
├── Mercado_livre/
│   ├── mercado.py   # Mercado Livre scraping script
│   ├── func.py      # Helper functions
│   └── run.bat      # Batch file to run Mercado Livre scraper

Setup

  1. Install Python 3.x if not already installed
  2. Install required packages:
    pip install selenium openpyxl
    
  3. Install Chrome WebDriver and ensure it's in your system PATH
  4. Prepare your input Excel file with the following columns:
    • Site name
    • Email
    • Password
    • Piece code
    • Product name
    • Reference price (R$)

Usage

For Amazon Brazil:

  1. Navigate to the Amazon directory
  2. Place your input file as entrada.xlsx in the directory
  3. Run the script:
    python amazon.py
    
    or double-click run.bat

For Mercado Livre:

  1. Navigate to the Mercado_livre directory
  2. Place your input file as input.xlsx in the directory
  3. Run the script:
    python mercado.py
    
    or double-click run.bat

Output

The script generates:

  • An Excel file (resultado.xlsx for Amazon, result.xlsx for Mercado Livre) containing:
    • Site name
    • Piece code
    • Product name
    • Reference price
    • Product description
    • Actual price
    • Brand
    • Seller information
    • Delivery information (Amazon only)
    • Product URL
    • Screenshot filename
  • Screenshots of product pages in a captura de tela (Amazon) or screenshot (Mercado Livre) directory

Notes

  • The tool requires manual intervention to bypass CAPTCHA/security checks when logging in
  • Price comparison is automated to only capture products below the reference price
  • Screenshots are automatically saved for product verification
  • The script handles various error cases and continues execution even if some products are not found

Limitations

  • Requires manual CAPTCHA solving
  • Subject to website changes and anti-bot measures
  • Requires stable internet connection
  • May need adjustments based on regional settings and marketplace variations

Disclaimer

This tool is for educational purposes only. Please ensure compliance with the terms of service of the respective marketplaces when using this tool.

About

Marketplace Scraping Tool for Amazon and Mercado Livre

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published