Git Product home page Git Product logo

wishlist's Introduction

Wishlist

Python library to grab your Amazon wishlist so you can mess with it programmatically.

Dependencies

What do I need if I have a private wishlist?

Wishlist depends on Brow in order to login from the command line (including 2 factor if enabled), and Brow depends on Selenium and Firefox to be installed, so you'll need to read Brow's README if you need help installing those on Linux.

What do I need if I have a public wishlist?

Nothing special, pip install wishlist should cover you, jump down to "Commandline wishlist access" and get started.

1 minute gettings started

Authentication for private lists

Is your wishlist private? Then you will need to authenticate on the command line:

$ wishlist auth

This will prompt you to signin and will even handle 2-factor authentication, after you signin your cookies will be saved so you can run now access your Amazon wishlist.

Commandline wishlist access

You can check access to your wishlist on the command line by running:

$ wishlist dump NAME

where NAME is the part of a url like https://www.amazon.com/gp/registry/wishlist/NAME, so, if your wishlist was found at: https://www.amazon.com/gp/registry/wishlist/9YDNFG31NSSRL then you would run:

$ wishlist dump 9YDNFG31NSSRL

Programmatic wishlist access

If you wanted to do something in another python script, you can do:

from wishlist.core import Wishlist

name = "9YDNFG31NSSRL"
w = Wishlist(name)
for item in w:
    print(w.jsonable())

You can check the wishlist.core.WishlistElement code to understand the structure of each wishlist item.

Installation

use pip:

$ pip install wishlist

Or be bleeding edge:

$ pip install "git+https://github.com/Jaymon/wishlist#egg=wishlist"

Regions

To change Amazon region from the default (amazon.com) to another (e.g. amazon.co.uk) just set the environment variable WISHLIST_HOST, for example:

export WISHLIST_HOST=https://amazon.co.uk

Other things

  • Why are you using Firefox for logging in? Why not Chrome? I tried to get it to work in Chrome but headless Chrome doesn't have all the features needed to work out authentication on the command line.

  • Would you rather use php? There's a library for that (also related).

  • Amazon's advertising api, this is where the officially supported wishlist api used to live.

wishlist's People

Contributors

jaymon avatar jantman avatar notmattlucas 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.