前提・実現したいこと
Amazon Product Advertising APIを使ってASINから商品のカテゴリを取得する方法を試しています。以下の参考資料を実行しています。
参考資料
発生している問題・エラーメッセージ
エラーが表示されており、どのように変更すればいいでしょうか。
$ python amazon_trial.py File "amazon_trial.py", line 8 print product.browse_nodes[0].ancestors[-1].name ^ SyntaxError: Missing parentheses in call to 'print'
該当のソースコード
Python
1# coding: utf-8 2 3from amazon.api import AmazonAPI 4 5amazon = AmazonAPI("ACCESS_KEY", "SECRET_KEY", "ASSOC_TAG", region="JP") 6try: 7 product = amazon.lookup(ItemId="B00BMKMP6Y") 8 print product.browse_nodes[0].ancestors[-1].name 9except Exception, e: 10 print e
補足情報(FW/ツールのバージョンなど)
Python 3.6.0 :: Anaconda 4.3.0 (x86_64)
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/01/29 06:09