Subversion Repositories SmartDukaan

Rev

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

Rev 17331 Rev 17332
Line 716... Line 716...
716
    #process_rejects("/home/amit/Downloads/RejectCashbackTemplate.xlsx")
716
    #process_rejects("/home/amit/Downloads/RejectCashbackTemplate.xlsx")
717
    #str1 = readSSh("/AmazonTrack/User2466/orderSummary28-06:13:25:08")
717
    #str1 = readSSh("/AmazonTrack/User2466/orderSummary28-06:13:25:08")
718
    #readSSh("/tmp/User2/404-2225153-7073122")
718
    #readSSh("/tmp/User2/404-2225153-7073122")
719
    #for orderId, trackingUrl in all.iteritems():
719
    #for orderId, trackingUrl in all.iteritems():
720
    store = getStore(1)
720
    store = getStore(1)
721
    store.parseOrderRawHtml(46417, '3442342424334344', 9722, readSSh("~/46417.html"), "https://www.amazon.in/gp/css/summary/edit.html?orderID=171-7620214-4375503")
721
    #store.parseOrderRawHtml(46417, '3442342424334344', 9722, readSSh("~/46417.html"), "https://www.amazon.in/gp/css/summary/edit.html?orderID=171-7620214-4375503")
722
     #   print store.parseTrackingUrl(trackingUrl, orderId)
722
     #   print store.parseTrackingUrl(trackingUrl, orderId)
723
    #store.scrapeStoreOrders()
723
    #store.scrapeStoreOrders()
724
#    store.scrapeStoreOrders()
724
#    store.scrapeStoreOrders()
725
    #store.parseInfo()
725
    #store.parseInfo()
726
    #store.trackOrdersForUser(4355, "", readSSh("~/4355"))
726
    #store.trackOrdersForUser(4355, "", readSSh("~/4355"))
Line 735... Line 735...
735
#        if summaryFile is None:
735
#        if summaryFile is None:
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"):
-
 
741
        o = session.query(OrdersRaw).filter_by(id = orderId)
-
 
742
        o = OrdersRaw()
-
 
743
        store.parseOrderRawHtml(o.user_id, o.sub_tag, o.user_id, o.rawhtml, o.order_url)
740
    
744
    
741
    #store.trackOrdersForUser(8703, 'https://www.amazon.in/gp/css/order-history', readSSh('/home/amit/Downloads/orderSummary06-10_12_15_54'))
745
    #store.trackOrdersForUser(8703, 'https://www.amazon.in/gp/css/order-history', readSSh('/home/amit/Downloads/orderSummary06-10_12_15_54'))
742
    
746
    
743
def getSummaryFile(directory):
747
def getSummaryFile(directory):
744
    date1 = datetime(2015,1,1)
748
    date1 = datetime(2015,1,1)