Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Last active June 16, 2016 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurozumi/f4aea30fd4e74b1cb6e4e723478fcf5d to your computer and use it in GitHub Desktop.
Save kurozumi/f4aea30fd4e74b1cb6e4e723478fcf5d to your computer and use it in GitHub Desktop.
【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