Giter Site home page Giter Site logo

apc's Introduction

Amazon price checker (APC)

Build Status

APC is just a little script I decided to play with after seeing a youtube video from Dev Ed. Nothing serious.

It allows to check the price on amazon articles based on their URL and a threshold price. If the article price drops below the threshold price, your receive and email alerting you that it is time to burn money ;-) Emails are sent out via gmail SMTP, so you will need a google account.

Installation

Clone the repo and install the required modules

pip install -r requirements.txt

Configuration

Feel free to remove the comments which are there only to define sections. Use the config-sample.yaml file and rename it to config.yaml.

# SMTP user name and password
login: "<your google username ([email protected])>"
password: "<your password or an app password if you use MFA>"
userAgent: "<the user agent to use>"
# Email From,To and Subject
sender: "<from email address>"
receiver: "to email address"
subject: "Price Drop Yo!"
# Articles
articles:
- url: "https://www.amazon.com/.../article1"
  thresholdPrice: 35
- url: "https://www.amazon.com/.../article2"
  thresholdPrice: 155.50
checkingPeriod: 7200

For the user agent string, simply open your browser and google "what's my user agent".

Usage

In the sample configuration, the checking period is set by default to 7200 seconds (2 hours). No need to get crazy about timing, deals usually last an entire day.

Run:

python3 app.py

You can use Docker or Kubernetes if you do not want to run locally.

Docker

Build your own image with the included docker file:

docker build -t "olibob/apc" .

Run the container by injecting your configuration:

docker run -d --name apc -v $PWD/config.yaml:/app/config.yaml olibob/apc

Kubernetes

In the Kubernetes directory, create a configmap based on your configuration.

kubectl create configmap apc-config --from-file=../config.yaml

Modify the apc-deployment.yaml file to deploy your own image or run it with the default image.

Deploy the app.

kubectl apply -f deployment.yaml

apc's People

Contributors

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