| Line 318... |
Line 318... |
| 318 |
if promoApplied > 0:
|
318 |
if promoApplied > 0:
|
| 319 |
totalPaid -= promoApplied
|
319 |
totalPaid -= promoApplied
|
| 320 |
if shippingPrice <= promoApplied:
|
320 |
if shippingPrice <= promoApplied:
|
| 321 |
totalPaid += shippingPrice
|
321 |
totalPaid += shippingPrice
|
| 322 |
|
322 |
|
| 323 |
shipmentDivs = orderDetailsContainer.find('div', class_='shipment').findAll('div', recursive = False)
|
323 |
shipmentDivs = orderDetailsContainer.findAll('div', class_='shipment')
|
| 324 |
subOrders = []
|
324 |
subOrders = []
|
| 325 |
merchantOrder.subOrders = subOrders
|
325 |
merchantOrder.subOrders = subOrders
|
| 326 |
closedStatus = True
|
326 |
closedStatus = True
|
| - |
|
327 |
subOrders = []
|
| 327 |
for shipmentDiv in shipmentDivs:
|
328 |
for shipmentDiv in shipmentDivs:
|
| - |
|
329 |
shipmentDiv = shipmentDiv.div
|
| 328 |
try:
|
330 |
try:
|
| 329 |
trackingUrl = 'http://www.amazon.in/' + shipmentDiv.find('span', class_='track-package-button').span.a.get('href')
|
331 |
trackingUrl = 'http://www.amazon.in/' + shipmentDiv.find('span', class_='track-package-button').span.a.get('href')
|
| 330 |
except:
|
332 |
except:
|
| 331 |
trackingUrl= None
|
333 |
trackingUrl= None
|
| 332 |
|
334 |
|
| Line 337... |
Line 339... |
| 337 |
try:
|
339 |
try:
|
| 338 |
deliverySpanTop = statusDiv.div.div.find_next_sibling('div').span
|
340 |
deliverySpanTop = statusDiv.div.div.find_next_sibling('div').span
|
| 339 |
productDivs = innerBoxes[-1].div.div.div.findAll('div', recursive=False)
|
341 |
productDivs = innerBoxes[-1].div.div.div.findAll('div', recursive=False)
|
| 340 |
except:
|
342 |
except:
|
| 341 |
productDivs = innerBoxes[-1].div.div.findAll('div', recursive=False)
|
343 |
productDivs = innerBoxes[-1].div.div.findAll('div', recursive=False)
|
| 342 |
subOrders = []
|
- |
|
| 343 |
merchantOrder.subOrders = subOrders
|
344 |
merchantOrder.subOrders = subOrders
|
| 344 |
for i, productDiv in enumerate(productDivs):
|
345 |
for i, productDiv in enumerate(productDivs):
|
| 345 |
deliverySpan = deliverySpanTop
|
346 |
deliverySpan = deliverySpanTop
|
| 346 |
j=i+1
|
347 |
j=i+1
|
| 347 |
if not deliverySpanTop:
|
348 |
if not deliverySpanTop:
|
| Line 769... |
Line 770... |
| 769 |
# session.commit()
|
770 |
# session.commit()
|
| 770 |
# finally:
|
771 |
# finally:
|
| 771 |
# session.close()
|
772 |
# session.close()
|
| 772 |
#store.trackOrdersForUser(10466, 'https://www.amazon.in/gp/css/summary/edit.html?orderID=403-7498756-0837158', readSSh('/AmazonTrack/User10466/403-7498756-0837158'))
|
773 |
#store.trackOrdersForUser(10466, 'https://www.amazon.in/gp/css/summary/edit.html?orderID=403-7498756-0837158', readSSh('/AmazonTrack/User10466/403-7498756-0837158'))
|
| 773 |
#store.trackOrdersForUser(10466, 'https://www.amazon.in/gp/css/summary/edit.html?orderID=403-2539406-8617932', readSSh('/AmazonTrack/User10466/403-2539406-8617932'))
|
774 |
#store.trackOrdersForUser(10466, 'https://www.amazon.in/gp/css/summary/edit.html?orderID=403-2539406-8617932', readSSh('/AmazonTrack/User10466/403-2539406-8617932'))
|
| 774 |
store.parseOrderRawHtml(58599, 'sub123', 9981, readSSh('/home/amit/sample.html'), 'https://www.amazon.in/gp/buy/spc/handlers/static-submit-decoupled.html/ref=ox_spc_place_order?ie=UTF8&fromAnywhere=1&hasWorkingJav')
|
775 |
store.trackOrdersForUser(57734, 'https://www.amazon.in/gp/css/summary/edit.html?orderID=171-8462636-5029117', readSSh('/home/amit/sample.html'))
|
| 775 |
|
776 |
|
| 776 |
def getSummaryFile(directory):
|
777 |
def getSummaryFile(directory):
|
| 777 |
date1 = datetime(2015,1,1)
|
778 |
date1 = datetime(2015,1,1)
|
| 778 |
finalFile = None
|
779 |
finalFile = None
|
| 779 |
try:
|
780 |
try:
|