| Line 291... |
Line 291... |
| 291 |
arr = delString.split(':')
|
291 |
arr = delString.split(':')
|
| 292 |
if "On" in arr[0]:
|
292 |
if "On" in arr[0]:
|
| 293 |
subOrder.deliveredOn = arr[1].strip()
|
293 |
subOrder.deliveredOn = arr[1].strip()
|
| 294 |
elif "Exp. Delivery by" in arr[0]:
|
294 |
elif "Exp. Delivery by" in arr[0]:
|
| 295 |
subOrder.estimatedDeliveryDate = arr[1].strip()
|
295 |
subOrder.estimatedDeliveryDate = arr[1].strip()
|
| - |
|
296 |
elif "Est. delivery between" in arr[0]:
|
| - |
|
297 |
subOrder.estimatedShippingDate = delString.split("between")[1].strip()
|
| 296 |
else:
|
298 |
else:
|
| 297 |
subOrder.estimatedShippingDate = arr[1].strip()
|
299 |
subOrder.estimatedShippingDate = arr[1].strip()
|
| 298 |
|
300 |
|
| 299 |
subOrder.imgUrl = imgDiv.a.img['src']
|
301 |
subOrder.imgUrl = imgDiv.a.img['src']
|
| 300 |
subOrder.productCode = re.findall(r'\d+$', productUrl)[0]
|
302 |
subOrder.productCode = re.findall(r'\d+$', productUrl)[0]
|
| Line 545... |
Line 547... |
| 545 |
arr = delString.split(':')
|
547 |
arr = delString.split(':')
|
| 546 |
if "On" in arr[0]:
|
548 |
if "On" in arr[0]:
|
| 547 |
updateMap['subOrders.$.deliveredOn'] = arr[1].strip()
|
549 |
updateMap['subOrders.$.deliveredOn'] = arr[1].strip()
|
| 548 |
elif "Exp. Delivery by" in arr[0]:
|
550 |
elif "Exp. Delivery by" in arr[0]:
|
| 549 |
updateMap['subOrders.$.estimatedDeliveryDate'] = arr[1].strip()
|
551 |
updateMap['subOrders.$.estimatedDeliveryDate'] = arr[1].strip()
|
| - |
|
552 |
elif "Est. delivery between" in arr[0]:
|
| - |
|
553 |
updateMap['subOrders.$.estimatedDeliveryDate'] = delString.split("between")[1].strip()
|
| 550 |
else:
|
554 |
else:
|
| 551 |
updateMap['subOrders.$.estimatedShippingDate'] = arr[1].strip()
|
555 |
updateMap['subOrders.$.estimatedShippingDate'] = arr[1].strip()
|
| 552 |
courierDet = subOrderElement.find('div', {'class':'courierDetail'})
|
556 |
courierDet = subOrderElement.find('div', {'class':'courierDetail'})
|
| 553 |
if courierDet is not None:
|
557 |
if courierDet is not None:
|
| 554 |
updateMap['subOrders.$.courierName'] = courierDet.span.text.strip()
|
558 |
updateMap['subOrders.$.courierName'] = courierDet.span.text.strip()
|
| Line 625... |
Line 629... |
| 625 |
return urllib.urlencode(parameters)
|
629 |
return urllib.urlencode(parameters)
|
| 626 |
|
630 |
|
| 627 |
def main():
|
631 |
def main():
|
| 628 |
#print todict([1,2,"3"])
|
632 |
#print todict([1,2,"3"])
|
| 629 |
store = getStore(3)
|
633 |
store = getStore(3)
|
| 630 |
store.parseOrderRawHtml(3322211, "3232311", 2, "32311243", "https://m.snapdeal.com/purchaseMobileComplete?code=926317148e560dbbe07f3326332662ec&order=6139907711")
|
634 |
#store.parseOrderRawHtml(332221, "3232311", 2, "32311243", "https://m.snapdeal.com/orderSummary?code=0d13e4b5535211c3ece929595f1281d3&order=7124223282")
|
| 631 |
#store.scrapeStoreOrders()
|
635 |
#store.scrapeStoreOrders()
|
| 632 |
#store._isSubOrderActive(8, "5970688907")
|
636 |
#store._isSubOrderActive(8, "5970688907")
|
| 633 |
#store.scrapeAffiliate()
|
637 |
#store.scrapeAffiliate()
|
| 634 |
#store.scrapeStoreOrders()
|
638 |
#store.scrapeStoreOrders()
|
| 635 |
|
639 |
|