Skip to content

adam0tokyo/amazon-price-tracking

Repository files navigation

Amazon Price Tracking

A basic web app for users to check amazon.co.jp products. Users can add a product URL, desired price, and their email address. Upon email confirmation, the app will check the product price daily until it is at or below the user’s desired price. When the desired price is met, the app will send the user an email alert about the price, along with some extra information.

Local Deployment

  • clone the repo, pipenv install or pip install in your terminal
  • create a .env file, see below for variable names and example
  • create a PostgreSQL database for the project
  • enable SMTP mail and get the information for your mail server
  • add variables to .env file
  • in python, from app import db then db.create_all() to create the database
  • python app.py to start the web app
  • run python price_track.py to process the requests, or schedule it to run at an interval

.env variables

APPDEBUGSTATE= //True or False, depending on local or hosted deployment
DBURI= //Postgres database URI
SMTP_SERVER= //mail server name
SMTP_PORT= //mail server port
EMAIL_ADDRESS= //mail server login
EMAIL_PASSWORD= //mail server password
ROOT_URL= //app deployment URL

.env example

APPDEBUGSTATE=True
DBURI=postgresql://postgres:mypass@localhost/simple-price-tracking
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
[email protected]
EMAIL_PASSWORD=abcd1234
ROOT_URL=http://127.0.0.1:5000/

Structure

structure

  • Python scripts
  • PostgreSQL database
  • Flask web framework
  • SQLAlchemy query builder for Flask
  • psycopg2 database access for Python scripts
  • Beautiful Soup4 web scraping
  • smtplib to send mail

Images

index

recieved

confirmation mail

confirmed

success

Feedback

Feel free to contact me by email, adam0tokyo at gmail for any questions or comments!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published