Code Monkey home page Code Monkey logo

amazon-price-tracker's Introduction

Amazon Price Alert

This script sends you an email alert if the Amazon product you are interested in has dropped in price compared to the set price. Be careful not to run it repeatedly in a short amount of time. This script was created to be used daily from a task scheduler.

Requirements

Python version 3.10.6 or higher installed.

How to install

  1. Download the project

  2. Create an .env file in the root of the project following the example below:

        # ----------------------- SCRAPE SETTINGS ----------------------
        # Note: Change only if necessary
        REQUEST_HEADERS_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
        REQUEST_HEADERS_ACCEPT_LANG="en-US, en;q=0.5"
        
        # ----------------------- DESIRED PRODUCT ----------------------
        TARGET_PRODUCT_URL="LINK TO AMAZON PRODUCT"
        TARGET_PRODUCT_PRICE=200
    
        # ----------------------- EMAIL SETTINGS -----------------------
        SMTP_SERVER_HOST="smtp.gmail.com"
        SMTP_SERVER_PORT=587
        SMTP_SERVER_USERNAME="YOUR GMAIL ADDRESS"
        SMTP_SERVER_PASSWORD="YOUR GMAIL PASSWORD"
    
        EMAIL_SENDER = "[email protected]"
        # If there is more than one email, separate them with a comma
        EMAIL_RECIPIENTS = "[email protected]"
        # --------------------------------------------------------------
  3. Open the project folder in Command Prompt or Terminal.

  4. Create a virtual environment and install the dependencies by running the following commands:

    • Using Poetry (if you already have it installed):

          poetry install      # create a virtual environment and install dependencies
          poetry shell        # enable the environment
    • Using built-in venv module:

      • Linux or Mac
          python -m venv venv                 # create a virtual environment
          source venv/bin/activate            # enable the environment            
          pip install -r requirements.txt     # install the dependencies
      • Windows (CMD)
          python -m venv venv                 # create a virtual environment
          venv\Scripts\activate.bat           # enable the environment            
          pip install -r requirements.txt     # install the dependencies
      • Windows (Power Shell)
          python -m venv venv                 # create a virtual environment
          venv\Scripts\activate.ps1           # enable the environment            
          pip install -r requirements.txt     # install the dependencies

How to run

    python amazon_price_tracker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.