Sunday, 15 January 2012

api - using bottlenose in python to extract product price from Amazon in different locale -



api - using bottlenose in python to extract product price from Amazon in different locale -

i using bottlenose extract product prices amazon, things doing ok extraction amazon.com, tried expand search amazon.co.uk, applied associate business relationship in amazon.co.uk, , obtained new associate-id.

amazon_search = bottlenose.amazon(str(aws_key.aws_access_key), str(aws_key.aws_secret_key), str(aws_key.aws_associate_key), maxqps=0.9) item_details = beautifulstonesoup(amazon_search.itemlookup(itemid=item_asin.text,responsegroup="offersummary")

i used code above, why output same amazon.com , amazon.co.uk after changed associate_key?

listing attribute within amazon_search class tell why:

print amazon_search.__dict__ {'maxqps': 0.9, 'awsaccesskeyid': 'xxxxxxxxxx', '_last_query_time': [none], 'awssecretaccesskey': 'xxxxxxxxxx', 'region': 'us', 'parser': none, 'cachereader': <function amazon_search_details_cache_read_fx @ 0x31841b8>, 'errorhandler': none, 'version': '2011-08-01', 'timeout': none, 'associatetag': 'xxxxxxxxxx-20', 'cachewriter': <function amazon_search_details_cache_write_fx @ 0x31840c8>, 'operation': none}

add attribute region whatever part want prepare problem. tested , works.

python api amazon

No comments:

Post a Comment