Giter Site home page Giter Site logo

amazon-price-alert's Introduction

Amazon-Price-Alert

This script will send you an email when the price for specific items you followed on Amazon drops beneath a certain price you set.

You can parse the price without Amazon API !

Installation

pip install -r requirements.txt

Then you need to edit the config.json first,

1. email โ†’ sender, sender-password, receivers
2. amazon-base_url (change to amazon store where your target item is)
3. item-to-parse (add item id which you want to track)

After installed required package and finished config.json, you can use it by python crawler.py

Required Accounts

1. Google Mail

Config file

Put config.json in same folder as code, or you can configure the path by '-c' argument

default-internal-time

Sleep time between each check (seconds)

email

  • sender : sender Google mail account
  • sender-password : sender Google mail account password
  • receivers : receivers' mail, you can add as much as you want

Remember to close the setting of Less Secure Apps

amazon-base url

Get url from your amazon of you location. For example : URL of Amazon JP is https://www.amazon.co.jp/dp/

item-to-parse

You need to put item ID and expected price here.

how can I get item ID from Amazon?

Step 1.

Search your item and go into the item page.

Example item: Nintendo Switch

Step 2.

You can find the item id in the url

Why my script can't get price from Amazon?

There may be two problem of it.

1.Your ip was banned by Amazon

Change your IP or wait for unban.

2.The item selector changed

How to change selector?

Step 1.

Search your item and go into the item page.

Example item: Nintendo Switch

Step 2.

Use your mouse and right click on the price text and choose inpector

Step 3.

You will see the selector id of price text in the inspector window

Email Layout

Server will send 3 kinds of mails to receiver

  1. Server working notification mail

    Send every day for reminding you server still working

  2. Server shutdown notification mail

    Server shutdown mail for reminding you to restart. Most reason of the problem is the server banned by Amazon. You can restart it after 30 minutes.

  3. Price dropped mail You will received price alert mail while your target item below the price you set.

Limitation

Checking interval time limitation

This code use some skill preventing banned by Amazon. However, the best interval time between each time of price checking is around 15 minutes.

Google mail account security

Less Secure Apps

Using Google smtp server to send mail, you need to enable less secure apps in your account for using it.

Dependencies

Python 2
lxml
json
requests
smtplib
MIMEText
ConfigParser, argparse, urlparse

Future feature

1. Direct message notification via Twitter

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.