Giter Club home page Giter Club logo

playstation-price-drop-alert's Introduction

playstation-price-drop-alert

Build Status

Command line tool for alerting price drops in the Sony Entertainment Network aka Playstation Network

Description

The Sony Entertainment Network (SEN) uses CIDs to identify items in it's catalogue. In order to alert you on the desired price of an SEN you need the CID. Use your Browser (cid GET parameter in URL) or this script (--search) to retrieve the CID.

In order to check the price of an item. You need a store identifier. These store identifiers are known to work:

  • DE/de
  • GB/en
  • US/en

Prices are always in the local currency. Therefore it is € for DE/de and £ for GB/en. Additionaly, prices are that for PlayStation Plus users.

Usage

Mail alerting

Just run python psnmailalert.py for mail alerting. See example below.

Command line interface

usage: psncli.py [-h] [--id ID] [--container CONTAINER] [--store STORE]
                 [--price PRICE] [--query QUERY]

optional arguments:
  -h, --help            show this help message and exit
  --id ID, -i ID        CID of game to check
  --container CONTAINER, -c CONTAINER
                        Container to list
  --store STORE, -s STORE
                        regional PSN store to check. Default: 'DE/de'
  --price PRICE, -p PRICE
                        desired price of game
  --query QUERY, -q QUERY
                        Name of item to search for

Retrieving UTF-8 encoded output on terminals

You may have to tell Python that your terminal is capable of dealing with UTF-8 outputs. Some PSN items are annoted with trademark, copyright or foreign language specific symbols. To do so set export PYTHONIOENCODING=utf-8 in your terminal window.

Example

You may run this script with the following command line variants:

Mail alerting - Get a mail when alerts have been met

With psnmailalert.py you may set alerts for price drops in the alerts.csv file. The first value is the CID for the item, the second is the price to be matched in order to alert you by mail, and the second value is the store to search in. You may mix stores in the alerts.csv. After a price has been matched, the alert is removed from alerts.csv. You will not get any further alerts for that item.

EP0001-NPEJ00305_00-B000000000001030,19.00,DE/de
EP0101-ULES01372_00-GPCMETALGE000001,10.00,DE/de

In order to receive mails you have to set your account settings in the file mailconfig.json. See mailconfig.json_example for an example config.

To run psnmailalert.py, just type:

./psnmailalert.py

Example mail

Mail with alerts

Searching for the CID of an item

Define the name of a game and the store.

./psncli.py --query "metal gear solid peace walker psp" --store DE/de

You will get a result containing one to many search results with the CID. The first output of each search line is the CID, the second the name, the third the supported systems and the last is a description of the item type in the local store language. It is "Vollversion" here which means "full version" in German.

EP0101-ULES01372_00-GPCMETALGE000001	Metal Gear Solid: Peace Walker [PSP]	PS Vita, PSP®	19.99	Vollversion

Check if desired price has been met

The price is in local currency. As exit statuses render the outcome of the alert, you may send you e-mails or desktop notifications with && or ||. In this example, there is a string printed to the console.

./psncli.py --cid EP0101-ULES01372_00-GPCMETALGE000001 --store DE/de --price 15.00 &&
echo "Price matched, let's buy Metal Gear Solid PW"

playstation-price-drop-alert's People

Contributors

shunkp avatar snipem avatar

Watchers

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