Coder Social home page Coder Social logo

python-pricealert-webapp's Introduction

/* *Name : Python Price Alert Web app

*Author : Arslan Mughal */

~~

Price Alert

~~

Introduction :

This is a python flask web app with which you can keep track item price in different Online stores and notify user by email when the price limit is reached for that client all you have to do is just signup and then create new alert for creating alert you have to simple place the URL of the item ,item name and the price at which you want the app to notify you when price reached .

requirements :

1 : python 3.x

2 : flask

3 : pymongo

4: MonoDB

for database install MongoDB

================================

Configurations

To set up app first go to models/alerts/constants.py and place your gmail credentials make sure that before placing credentials you have enable gmail SMTP setting in your gmail account that you gonna be use .

Runing App:

To tun app first make sure that you have installed all the pakages and database before going ahead :) before runing the app first open a terminal (for windows cmd) and start MongoDB first make sure that mongoDB is running on port 27017 if you are using differnt port than change the configuration in /database/database.py open database.py file in any text edditor and change URI = "mongodb://127.0.0.1:27017" port number to your desier port . After setting up the database open a terminal in source folder location and type this command root@kali~# python3 run.py this will start the flask server at prot 4545 you can change port by going to run.py file and editing the port to your desier one . go to your browser localhost:4545 and first register user and than you can login :)

Adding Stores :

So On fresh startup there are no stores in the database you have to manually add stores for that run a separate python shell and do the following : >> from common.database import Database >> from models.stores import store >> Database.initialize() >> store = Store(name, url_prefix, tag_name, query) >> store.save_to_mongo()

tires:

name == "type the store name in string above :)"

url_prefix == "type the url for store in string see the example below"

tag_name == "inspect the the element for item in specific store and see what tag is holding price element in html see example below"

query == "name of html attibutes with in the tag that is holding the price of item example below"

forexample :

>>store = Store("ebay", "http://www.ebay/com", "span", {"itemprop":"price"}) >> store.save_to_mongo() and this will add the store to database and like this you can add many stores but since project is not fully developed so there can be issue adding some stores these are the stores that i have personally tried :

**ebay.com

aliexpress.com

daraz.pk**

and all is working fine with these stores

python-pricealert-webapp's People

Contributors

arslanmughal99 avatar

Stargazers

 avatar  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.