# 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](https://github.com/Jaymon/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](https://github.com/Jaymon/brow/blob/master/README.md) 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 access your Amazon wishlist on the command line.
### 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:
```python
from wishlist.core import Wishlist
name = "9YDNFG31NSSRL"
w = Wishlist(name)
for item in w:
print(item.jsonable())
```
You can check the [wishlist.core.WishlistElement](https://github.com/Jaymon/wishlist/blob/master/wishlist/core.py) code to understand the structure of each wishlist item.
## Installation
use pip:
$ pip install wishlist
To get the bleeding edge version:
$ pip install --upgrade "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
```
The environment is setup at module import, so if you need to modify the environment during runtime you should use `wishlist.environ`, so to set the host at runtime, you could do something like:
```python
from wishlist.core import Wishlist
from wishlist import environ
environ.HOST="https://www.amazon.fr"
```
## Other things
* Why are you using Firefox for logging in? Why not Chrome? I tried to get it to work in headless Chrome but all the features I needed to work out authentication on the command line weren't supported.
* Would you rather use php? [There's a library for that](https://github.com/doitlikejustin/amazon-wish-lister) ([also related](https://shkspr.mobi/blog/2015/11/an-api-for-amazon-wishlists/)).
* [Amazon's advertising api](http://docs.aws.amazon.com/AWSECommerceService/latest/DG/Welcome.html) is where the officially supported wishlist api used to live.
Raw data
{
"_id": null,
"home_page": "http://github.com/Jaymon/wishlist",
"name": "wishlist",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Jay Marcyes",
"author_email": "jay@marcyes.com",
"download_url": "https://files.pythonhosted.org/packages/37/93/44b707128fde1eb4d78d9232ac86a8cf8b4a09d854ef87cb8f4caabf4896/wishlist-0.5.3.tar.gz",
"platform": "",
"description": "# Wishlist\n\nPython library to grab your Amazon wishlist so you can mess with it programmatically.\n\n\n## Dependencies\n\n### What do I need if I have a private wishlist?\n\nWishlist depends on [Brow](https://github.com/Jaymon/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](https://github.com/Jaymon/brow/blob/master/README.md) if you need help installing those on Linux.\n\n\n### What do I need if I have a public wishlist?\n\nNothing special, `pip install wishlist` should cover you, jump down to \"Commandline wishlist access\" and get started.\n\n\n## 1 minute gettings started\n\n\n### Authentication for private lists\n\nIs your wishlist private? Then you will need to authenticate on the command line:\n\n $ wishlist auth\n\nThis will prompt you to signin and will even handle 2-factor authentication, after you signin your cookies will be saved so you can access your Amazon wishlist on the command line.\n\n\n### Commandline wishlist access\n\nYou can check access to your wishlist on the command line by running:\n\n $ wishlist dump NAME\n\nwhere `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:\n\n $ wishlist dump 9YDNFG31NSSRL\n\n\n### Programmatic wishlist access\n\nIf you wanted to do something in another python script, you can do:\n\n```python\nfrom wishlist.core import Wishlist\n\nname = \"9YDNFG31NSSRL\"\nw = Wishlist(name)\nfor item in w:\n print(item.jsonable())\n```\n\nYou can check the [wishlist.core.WishlistElement](https://github.com/Jaymon/wishlist/blob/master/wishlist/core.py) code to understand the structure of each wishlist item.\n\n\n## Installation\n\nuse pip:\n\n $ pip install wishlist\n\nTo get the bleeding edge version:\n\n $ pip install --upgrade \"git+https://github.com/Jaymon/wishlist#egg=wishlist\"\n\n\n## Regions\n\nTo change Amazon region from the default (amazon.com) to another (e.g. amazon.co.uk) just set the environment variable WISHLIST_HOST, for example:\n\n```\nexport WISHLIST_HOST=https://amazon.co.uk\n```\n\nThe environment is setup at module import, so if you need to modify the environment during runtime you should use `wishlist.environ`, so to set the host at runtime, you could do something like:\n\n```python\nfrom wishlist.core import Wishlist\nfrom wishlist import environ\n\nenviron.HOST=\"https://www.amazon.fr\"\n```\n\n\n## Other things\n\n* Why are you using Firefox for logging in? Why not Chrome? I tried to get it to work in headless Chrome but all the features I needed to work out authentication on the command line weren't supported.\n\n* Would you rather use php? [There's a library for that](https://github.com/doitlikejustin/amazon-wish-lister) ([also related](https://shkspr.mobi/blog/2015/11/an-api-for-amazon-wishlists/)).\n\n* [Amazon's advertising api](http://docs.aws.amazon.com/AWSECommerceService/latest/DG/Welcome.html) is where the officially supported wishlist api used to live.",
"bugtrack_url": null,
"license": "GPLv2+",
"summary": "Amazon wishlist scraper",
"version": "0.5.3",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ec568218aba06ca0ca0dd14af9ae7d31",
"sha256": "4f497db38d8e2da738b0dc246cc4adeee27a643c1171a9734e51a17f032cf5fc"
},
"downloads": -1,
"filename": "wishlist-0.5.3.tar.gz",
"has_sig": false,
"md5_digest": "ec568218aba06ca0ca0dd14af9ae7d31",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11053,
"upload_time": "2020-11-17T21:43:46",
"upload_time_iso_8601": "2020-11-17T21:43:46.276359Z",
"url": "https://files.pythonhosted.org/packages/37/93/44b707128fde1eb4d78d9232ac86a8cf8b4a09d854ef87cb8f4caabf4896/wishlist-0.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-11-17 21:43:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Jaymon",
"github_project": "wishlist",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "wishlist"
}