Git Product home page Git Product logo

price-drop-alert-flipkart's Introduction

Price-drop-alert

This is a simple price drop alert system made with Django.

Working

  • User needs to register first, with an email id of their choice .
  • Then login with the registered credentials.
  • User may enter a product URL copied from flipkart ,then check the response and add it to the watchlist.
  • All URLs in the watchlist are scraped every time the scheduler runs.
  • Changes to the price or availability of the product is then saved to the database.
  • User will get an email when the product experiences a price drop or whenever the product is back in stock.

Dependencies

Install dependencies beforehand.

pip install -r requirements.txt

Quick setup before running

1) Add a .env file in 'pricedrop' folder with following contents

EMAIL_HOST_USER = "replace this with the email-id( Gmail id ) you are going to use."
EMAIL_HOST_PASSWORD = "the google account password"

Note: This Email-id and password(must be a Gmail one) is for the system to mail the alerts to the users. The registering users must enter their email-id on the sign-up page.

Also enable less secure app access in google account

2) Create a MySQL data base named 'django_pricedrop_db'

The database used is MySQL due to limitations in SQLite.

3) Comment the ready() method in 'linkadd/apps.py'

This is to prevent "Table 'django_pricedrop_db.django_apscheduler_djangojob' doesn't exist" error when migrating the database.

    # def ready(self):
    #         from .scheduler import scheduler
    #         scheduler.start()

4) Migrate the database

python manage.py makemigrations

then

python manage.py migrate

5) Final step , Uncomment the ready() method in 'linkadd/apps.py'

as below This is to start the periodic scheduler

    def ready(self):
            from .scheduler import scheduler
            scheduler.start()

Running

For running use

python manage.py runserver --noreload

use --noreload otherwise scheduler will run twice

Disclaimer

Web scraping and crawling aren't illegal, but scraping a website without the owners permission is not legal.

Use it only for educational purpose and don't overwhelm the servers by sending mass requests.

price-drop-alert-flipkart's People

Contributors

yaswanth-c avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.