Skip to content

Instantly share code, notes, and snippets.

@kurozumi kurozumi/lookup.py

Last active Jun 16, 2016
Embed
What would you like to do?
【Python】アマゾン商品の親カテゴリを取得
# coding: utf-8
from amazon.api import AmazonAPI
amazon = AmazonAPI("ACCESS_KEY", "SECRET_KEY", "ASSOC_TAG", region="JP")
try:
product = amazon.lookup(ItemId="B00BMKMP6Y")
print product.browse_nodes[0].ancestors[-1].name
except Exception, e:
print e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.