製品のサブカテゴリの売上ランクを取得しようとしています (該当する場合)。これは、Python で作成したスクリプトです。
amazon=bottlenose.Amazon('AmazonCredentials',MaxQPS=0.9)
response = amazon.ItemLookup(ItemId="B007SNQ4FM", ResponseGroup="Large", )
x = etree.XML(response)
string_to_store=etree.tostring(x, pretty_print = True)
print string_to_store
アマゾンからの返信
..............
................
<SalesRank>12677</SalesRank>
<SmallImage>
<URL>http://ecx.images-amazon.com/images/I/31Nk86so5xL._SL75_.jpg</URL>
<Height Units="pixels">75</Height>
<Width Units="pixels">26</Width>
</SmallImage>
..........
..........
実際の応答はここで確認できます: http://pastebin.com/rCUKCbas
元のページ (つまり、詳細ページの URL) の URL: http://www.amazon.com/Luma-Comfort-EC45S-Evaporative-Cooling/dp/B007SNQ4FM%3FSubscriptionId%3DAKIAICPZU6FE2WKAQMZQ%26tag%3Drelierscom-20%26linkCode%3Dxm2 %26camp%3D2025%26creative%3D165953%26creativeASIN%3DB007SNQ4FM
Web からの製品の詳細:
ASIN: B007SNQ4FM
Item model number: EC45S
Average Customer Review: 2.4 out of 5 stars See all reviews (59 customer reviews)
Amazon Best Sellers Rank: #12,677 in Home & Kitchen (See Top 100 in Home & Kitchen)
#1 in Home Improvement > Appliances > Range Hoods
#18 in Home & Kitchen > Heating, Cooling & Air Quality > Air Conditioners & Accessories > Portable
上記では、異なるカテゴリの下に 3 つのランキングがあることがわかりますが、製品 API を使用すると 1 つのランク (12,677) しか取得できませんが、他の 2 つのランキングを取得するにはどうすればよいでしょうか。