Subversion Repositories SmartDukaan

Rev

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

Rev 12400 Rev 12401
Line 393... Line 393...
393
    aggResponse = amScraper.read(skuUrls, True)
393
    aggResponse = amScraper.read(skuUrls, True)
394
    notfetch = list(set(kshitij)-set(aggResponse.keys()))
394
    notfetch = list(set(kshitij)-set(aggResponse.keys()))
395
    print "kshitij"
395
    print "kshitij"
396
    print len(notfetch)
396
    print len(notfetch)
397
    print notfetch 
397
    print notfetch 
398
    time.sleep(2)
-
 
399
    
398
    
400
#    for asin, scrapInfo in aggResponse:
399
#    for asin, scrapInfo in aggResponse:
401
#        skuList = skuAsinMap.get(asin)
400
#        skuList = skuAsinMap.get(asin)
402
#        for sku in skuList:
401
#        for sku in skuList:
403
#            amDetails = __AmazonDetails(None, None, None, None, None,secondLowestSellerName, secondLowestSellerSp, thirdLowestSellerName, thirdLowestSellerSp)
402
#            amDetails = __AmazonDetails(None, None, None, None, None,secondLowestSellerName, secondLowestSellerSp, thirdLowestSellerName, thirdLowestSellerSp)
Line 424... Line 423...
424
        ourSp, ourRank, lowestSellerSp, secondLowestSellerSp, thirdLowestSellerSp, ourTp, lowestPossibleSp, lowestPossibleTp = (0,)*8
423
        ourSp, ourRank, lowestSellerSp, secondLowestSellerSp, thirdLowestSellerSp, ourTp, lowestPossibleSp, lowestPossibleTp = (0,)*8
425
        sku = val.sku
424
        sku = val.sku
426
        scrapedSkuLocation = None
425
        scrapedSkuLocation = None
427
        multipleListings = False
426
        multipleListings = False
428
        for info in scrapInfo:
427
        for info in scrapInfo:
-
 
428
            print "iterating scrap info"
429
            if (info['sellerName']).strip()=='Saholic':
429
            if (info['sellerName']).strip()=='Saholic':
430
                if ourRank>0:
430
                if ourRank>0:
431
                    multipleListings = True
431
                    multipleListings = True
432
                ourSp = info['sellerPrice']
432
                ourSp = info['sellerPrice']
433
                ourRank = iterator+1
433
                ourRank = iterator+1
Line 463... Line 463...
463
            if iterator == 2:
463
            if iterator == 2:
464
                thirdLowestSellerName = info['sellerName']
464
                thirdLowestSellerName = info['sellerName']
465
                thirdLowestSellerSp = info['sellerPrice']
465
                thirdLowestSellerSp = info['sellerPrice']
466
            
466
            
467
            iterator += 1
467
            iterator += 1
468
        
468
        print "terminating iterator"
469
        #if cheapestSkuLocation!=val.state_id
469
        #if cheapestSkuLocation!=val.state_id
470
        
470
        
471
        if ourSp==0 or scrapedSkuLocation is None:
471
        if ourSp==0 or scrapedSkuLocation is None:
472
            print "Sku not present in top 3.Getting price from amazonAsinPrice...or multiple listings"
472
            print "Sku not present in top 3.Getting price from amazonAsinPrice...or multiple listings"
473
            if ourSp==0:
473
            if ourSp==0: