Subversion Repositories SmartDukaan

Rev

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

Rev 12389 Rev 12390
Line 254... Line 254...
254
    for amPromotion in amPromotions:
254
    for amPromotion in amPromotions:
255
        amazonLongTermActivePromotions.append(amPromotion.sku)
255
        amazonLongTermActivePromotions.append(amPromotion.sku)
256
    session.close()
256
    session.close()
257
    print "item info length"
257
    print "item info length"
258
    print len(itemInfo)
258
    print len(itemInfo)
259
    sys.exit(1)
-
 
260
    return itemInfo
259
    return itemInfo
261
 
260
 
262
def decideCategory(itemInfo):
261
def decideCategory(itemInfo):
263
    exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete = [],[],[],[],[],[],[] 
262
    exceptionList, negativeMargin, cheapest, amongCheapestAndCanCompete, canCompete, almostCompete, cantCompete = [],[],[],[],[],[],[] 
264
    skuUrls = []
263
    skuUrls = []
Line 273... Line 272...
273
            continue
272
            continue
274
        skuUrls.append('http://www.amazon.in/gp/offer-listing/'+item.asin+'/ref=olp_sort_ps')
273
        skuUrls.append('http://www.amazon.in/gp/offer-listing/'+item.asin+'/ref=olp_sort_ps')
275
        kshitij.append(item.asin)
274
        kshitij.append(item.asin)
276
    aggResponse = amScraper.read(skuUrls, True)
275
    aggResponse = amScraper.read(skuUrls, True)
277
    notfetch = list(set(kshitij)-set(aggResponse.keys()))
276
    notfetch = list(set(kshitij)-set(aggResponse.keys()))
-
 
277
    print "kshitij"
278
    print len(notfetch)
278
    print len(notfetch)
279
    print notfetch 
279
    print notfetch 
280
    time.sleep(2)
280
    time.sleep(2)
281
    
281
    
282
#    for asin, scrapInfo in aggResponse:
282
#    for asin, scrapInfo in aggResponse: