| Line 201... |
Line 201... |
| 201 |
orderStatus = sdivs[0].span.text.strip()
|
201 |
orderStatus = sdivs[0].span.text.strip()
|
| 202 |
status = self._getStatusFromDetailedStatus(orderStatus)
|
202 |
status = self._getStatusFromDetailedStatus(orderStatus)
|
| 203 |
if status == MStore.ORDER_DELIVERED:
|
203 |
if status == MStore.ORDER_DELIVERED:
|
| 204 |
deliveredOn = sdivs[0].findAll('span')[-1].text.strip()
|
204 |
deliveredOn = sdivs[0].findAll('span')[-1].text.strip()
|
| 205 |
deliveredOn = deliveredOn.split(":")[1].strip()
|
205 |
deliveredOn = deliveredOn.split(":")[1].strip()
|
| 206 |
else:
|
- |
|
| 207 |
deliveryestimatespan = sdivs[0].find('span', {'class':'a-color-success'})
|
206 |
deliveryestimatespan = sdivs[0].find('span', {'class':'a-color-success'})
|
| 208 |
deliveryEstimate = None
|
207 |
deliveryEstimate = None
|
| 209 |
if deliveryestimatespan is not None:
|
208 |
if deliveryestimatespan is not None:
|
| 210 |
deliveryEstimate = deliveryestimatespan.find('span', {'class':'a-text-bold'}).text.strip()
|
209 |
deliveryEstimate = deliveryestimatespan.find('span', {'class':'a-text-bold'}).text.strip()
|
| 211 |
productDivs = shipdiv.find('div', {'class':re.compile('.*?a-spacing-top-medium.*?')}).find('div', {'class':'a-row'}).findAll('div', recursive=False)
|
210 |
productDivs = shipdiv.find('div', {'class':re.compile('.*?a-spacing-top-medium.*?')}).find('div', {'class':'a-row'}).findAll('div', recursive=False)
|
| 212 |
trackingUrl = None
|
211 |
trackingUrl = None
|
| 213 |
for buttonDiv in shipdiv.findAll('span', {'class':'a-button-inner'}):
|
212 |
for buttonDiv in shipdiv.findAll('span', {'class':'a-button-inner'}):
|
| 214 |
if buttonDiv.find('a').text.strip()=='Track package':
|
213 |
if buttonDiv.find('a').text.strip()=='Track package':
|
| 215 |
trackingUrl = buttonDiv.find('a')['href'].strip()
|
214 |
trackingUrl = buttonDiv.find('a')['href'].strip()
|
| 216 |
if not trackingUrl.startswith("http"):
|
215 |
if not trackingUrl.startswith("http"):
|