| Line 736... |
Line 736... |
| 736 |
# print "No summary for", userId
|
736 |
# print "No summary for", userId
|
| 737 |
# else:
|
737 |
# else:
|
| 738 |
# print userId, directory+summaryFile
|
738 |
# print userId, directory+summaryFile
|
| 739 |
# store.trackOrdersForUser(userId, 'https://www.amazon.in/gp/css/order-history', readSSh(directory + summaryFile))
|
739 |
# store.trackOrdersForUser(userId, 'https://www.amazon.in/gp/css/order-history', readSSh(directory + summaryFile))
|
| 740 |
for orderId in store.db.merchantOrder.find({"storeId":1, "status":"html_required"}).distinct("orderId"):
|
740 |
for orderId in store.db.merchantOrder.find({"storeId":1, "status":"html_required"}).distinct("orderId"):
|
| - |
|
741 |
try:
|
| 741 |
o = session.query(OrdersRaw).filter_by(id = orderId)
|
742 |
o = session.query(OrdersRaw).filter_by(id = orderId)
|
| - |
|
743 |
store.parseOrderRawHtml(o.id, o.sub_tag, o.user_id, o.rawhtml, o.order_url)
|
| 742 |
o = OrdersRaw()
|
744 |
except:
|
| 743 |
store.parseOrderRawHtml(o.id, o.sub_tag, o.user_id, o.rawhtml, o.order_url)
|
745 |
print "Could not parse", o.id
|
| 744 |
|
746 |
|
| 745 |
#store.trackOrdersForUser(8703, 'https://www.amazon.in/gp/css/order-history', readSSh('/home/amit/Downloads/orderSummary06-10_12_15_54'))
|
747 |
#store.trackOrdersForUser(8703, 'https://www.amazon.in/gp/css/order-history', readSSh('/home/amit/Downloads/orderSummary06-10_12_15_54'))
|
| 746 |
|
748 |
|
| 747 |
def getSummaryFile(directory):
|
749 |
def getSummaryFile(directory):
|
| 748 |
date1 = datetime(2015,1,1)
|
750 |
date1 = datetime(2015,1,1)
|