| Line 63... |
Line 63... |
| 63 |
temp = {}
|
63 |
temp = {}
|
| 64 |
try:
|
64 |
try:
|
| 65 |
if len(info)==3:
|
65 |
if len(info)==3:
|
| 66 |
break
|
66 |
break
|
| 67 |
amount = offer.getElementsByTagName('Amount')[0].firstChild.nodeValue
|
67 |
amount = offer.getElementsByTagName('Amount')[0].firstChild.nodeValue
|
| 68 |
temp['sellingPrice'] = amount
|
68 |
temp['sellingPrice'] = float(amount)
|
| 69 |
temp['promoPrice'] = amount
|
69 |
temp['promoPrice'] = float(amount)
|
| 70 |
temp['fulfillmentChannel'] = offer.getElementsByTagName('FulfillmentChannel')[0].firstChild.nodeValue
|
70 |
temp['fulfillmentChannel'] = offer.getElementsByTagName('FulfillmentChannel')[0].firstChild.nodeValue
|
| 71 |
try:
|
71 |
try:
|
| 72 |
temp['shippingTime'] = (offer.getElementsByTagName('Max')[0].firstChild.nodeValue).replace('days','')
|
72 |
temp['shippingTime'] = (offer.getElementsByTagName('Max')[0].firstChild.nodeValue).replace('days','')
|
| 73 |
except:
|
73 |
except:
|
| 74 |
temp['shippingTime'] = '0-0'
|
74 |
temp['shippingTime'] = '0-0'
|
| Line 109... |
Line 109... |
| 109 |
for offer in skuOffer.getElementsByTagName('Offers'):
|
109 |
for offer in skuOffer.getElementsByTagName('Offers'):
|
| 110 |
temp = {}
|
110 |
temp = {}
|
| 111 |
try:
|
111 |
try:
|
| 112 |
promoPrice = offer.getElementsByTagName('LandedPrice')[0].getElementsByTagName('Amount')[0].firstChild.nodeValue
|
112 |
promoPrice = offer.getElementsByTagName('LandedPrice')[0].getElementsByTagName('Amount')[0].firstChild.nodeValue
|
| 113 |
regularPrice = offer.getElementsByTagName('RegularPrice')[0].getElementsByTagName('Amount')[0].firstChild.nodeValue
|
113 |
regularPrice = offer.getElementsByTagName('RegularPrice')[0].getElementsByTagName('Amount')[0].firstChild.nodeValue
|
| 114 |
temp['sellingPrice'] = regularPrice
|
114 |
temp['sellingPrice'] = float(regularPrice)
|
| 115 |
temp['promoPrice'] = promoPrice
|
115 |
temp['promoPrice'] = float(promoPrice)
|
| 116 |
if promoPrice == regularPrice:
|
116 |
if promoPrice == regularPrice:
|
| 117 |
temp['promotion'] = False
|
117 |
temp['promotion'] = False
|
| 118 |
else:
|
118 |
else:
|
| 119 |
temp['promotion'] = True
|
119 |
temp['promotion'] = True
|
| 120 |
temp['status'] = status
|
120 |
temp['status'] = status
|
| Line 162... |
Line 162... |
| 162 |
num+=1
|
162 |
num+=1
|
| 163 |
return self.make_request(data,'GetLowestOfferListingsForSKU')
|
163 |
return self.make_request(data,'GetLowestOfferListingsForSKU')
|
| 164 |
|
164 |
|
| 165 |
def main():
|
165 |
def main():
|
| 166 |
p = Products("AKIAII3SGRXBJDPCHSGQ", "B92xTbNBTYygbGs98w01nFQUhbec1pNCkCsKVfpg", "AF6E3O0VE0X4D")
|
166 |
p = Products("AKIAII3SGRXBJDPCHSGQ", "B92xTbNBTYygbGs98w01nFQUhbec1pNCkCsKVfpg", "AF6E3O0VE0X4D")
|
| 167 |
comp = p.get_competitive_pricing_for_sku('A21TJRUUN4KGV', ['FBA11707'])
|
167 |
comp = p.get_competitive_pricing_for_sku('A21TJRUUN4KGV', ['FBA16293'])
|
| 168 |
our = p.get_my_pricing_for_sku('A21TJRUUN4KGV', ['FBA11739'])
|
168 |
our = p.get_my_pricing_for_sku('A21TJRUUN4KGV', ['FBA3024'])
|
| 169 |
print comp
|
169 |
print comp
|
| 170 |
print our
|
170 |
print our
|
| - |
|
171 |
#print our.get('promotion')
|
| 171 |
# print comp.get('FBA12248')
|
172 |
# print comp.get('FBA12248')
|
| 172 |
# print our.get('FBA12248')
|
173 |
# print our.get('FBA12248')
|
| 173 |
# x = (our.get('FBA12248'))
|
174 |
# x = (our.get('FBA12248'))
|
| 174 |
# x['sellingPrice']=41089
|
175 |
# x['sellingPrice']=41089
|
| 175 |
# l = (comp.get('FBA12248'))
|
176 |
# l = (comp.get('FBA12248'))
|