Subversion Repositories SmartDukaan

Rev

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

Rev 15951 Rev 15956
Line 65... Line 65...
65
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':1,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail'],'coupon':data['coupon'], 'codAvailable':data['codAvailable']}
65
                    return {'_id':data['_id'],'available_price':data['available_price'],'in_stock':data['in_stock'],'source_id':1,'source_product_name':data['source_product_name'],'marketPlaceUrl':data['marketPlaceUrl'],'thumbnail':data['thumbnail'],'coupon':data['coupon'], 'codAvailable':data['codAvailable']}
66
            except:
66
            except:
67
                pass
67
                pass
68
            
68
            
69
            
69
            
70
            url = "http://www.amazon.in/gp/offer-listing/%s/ref=olp_sort_ps"%(data['identifier'])
70
            url = "http://www.amazon.in/gp/aw/ol/%s?o=New&op=1"%(data['identifier'])
71
            lowestPrice = 0.0
71
            lowestPrice = 0.0
72
            try:
72
            try:
73
                if data['dealFlag'] ==1 and data['dealType'] ==1:
73
                if data['dealFlag'] ==1 and data['dealType'] ==1:
74
                    print "Inside deal"
74
                    print "Inside deal"
75
                    deal_url = "http://www.amazon.in/dp/%s"%(data['identifier'].strip())
75
                    deal_url = "http://www.amazon.in/dp/%s"%(data['identifier'].strip())
Line 479... Line 479...
479
            item['manualDealThresholdPrice'] = manualDeals[0]['dealThresholdPrice']
479
            item['manualDealThresholdPrice'] = manualDeals[0]['dealThresholdPrice']
480
        info = returnLatestPrice(item, item['source_id'],False)
480
        info = returnLatestPrice(item, item['source_id'],False)
481
        print info
481
        print info
482
 
482
 
483
def main():
483
def main():
-
 
484
    print datetime.now()
484
    print "retuned %s"%(str(getLatestPrice(33)))
485
    print "retuned %s"%(str(getLatestPriceById(23165)))
485
 
-
 
-
 
486
    print datetime.now()
486
if __name__=='__main__':
487
if __name__=='__main__':
487
    main()
488
    main()
488
    
489