Last active
June 16, 2016 10:08
-
-
Save kurozumi/f4aea30fd4e74b1cb6e4e723478fcf5d to your computer and use it in GitHub Desktop.
【Python】アマゾン商品の親カテゴリを取得
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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