Subversion Repositories SmartDukaan

Rev

Rev 17334 | Rev 17347 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17334 Rev 17335
Line 737... Line 737...
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
        try:
742
            o = session.query(OrdersRaw).filter_by(id = orderId)
742
            o = session.query(OrdersRaw).filter_by(id = orderId).one()
743
            store.parseOrderRawHtml(o.id, o.sub_tag, o.user_id, o.rawhtml, o.order_url)
743
            store.parseOrderRawHtml(o.id, o.sub_tag, o.user_id, o.rawhtml, o.order_url)
744
        except:
744
        except:
745
            print "Could not parse", o.id
745
            print "Could not parse", orderId
746
    
746
    
747
    #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'))
748
    
748
    
749
def getSummaryFile(directory):
749
def getSummaryFile(directory):
750
    date1 = datetime(2015,1,1)
750
    date1 = datetime(2015,1,1)