| Line 36... |
Line 36... |
| 36 |
params['ExcludeMe']='true'
|
36 |
params['ExcludeMe']='true'
|
| 37 |
params.update(extra_data)
|
37 |
params.update(extra_data)
|
| 38 |
request_description = '&'.join(['%s=%s' % (k, urllib.quote(params[k], safe='-_.~').encode('utf-8')) for k in sorted(params)])
|
38 |
request_description = '&'.join(['%s=%s' % (k, urllib.quote(params[k], safe='-_.~').encode('utf-8')) for k in sorted(params)])
|
| 39 |
signature = self.calc_signature(method, request_description)
|
39 |
signature = self.calc_signature(method, request_description)
|
| 40 |
url = '%s%s?%s&Signature=%s' % (self.domain, self.uri, request_description, urllib.quote(signature))
|
40 |
url = '%s%s?%s&Signature=%s' % (self.domain, self.uri, request_description, urllib.quote(signature))
|
| 41 |
print url
|
- |
|
| 42 |
#headers = {'User-Agent': 'AmazonJavascriptScratchpad/1.0 (Language=Python)'}
|
41 |
#headers = {'User-Agent': 'AmazonJavascriptScratchpad/1.0 (Language=Python)'}
|
| 43 |
#headers.update(kwargs.get('extra_headers', {}))
|
42 |
#headers.update(kwargs.get('extra_headers', {}))
|
| 44 |
response = request(method, url)
|
43 |
response = request(method, url)
|
| 45 |
if action=='GetLowestOfferListingsForSKU':
|
44 |
if action=='GetLowestOfferListingsForSKU':
|
| 46 |
return self.parse_competitor_pricing_response(response)
|
45 |
return self.parse_competitor_pricing_response(response)
|