Subversion Repositories SmartDukaan

Rev

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

Rev 15520 Rev 15535
Line 105... Line 105...
105
            print vendorInfo
105
            print vendorInfo
106
            lowestSp, iterator, ourInventory, lowestSellerInventory,ourSp,ourOfferPrice,lowestSp,lowestOfferPrice   = (0,)*8
106
            lowestSp, iterator, ourInventory, lowestSellerInventory,ourSp,ourOfferPrice,lowestSp,lowestOfferPrice   = (0,)*8
107
            lowestSellerName = ''
107
            lowestSellerName = ''
108
            for vendor in vendorInfo:
108
            for vendor in vendorInfo:
109
                if iterator == 0:
109
                if iterator == 0:
110
                    lowestSellerName = vendor['vendorDisplayName']
110
                    lowestSellerName = vendor['vendorDisplayName'].decode("utf-8")
111
                    try:
111
                    try:
112
                        lowestSp = vendor['sellingPriceBefIntCashBack']
112
                        lowestSp = vendor['sellingPriceBefIntCashBack']
113
                    except:
113
                    except:
114
                        lowestSp = vendor['sellingPrice']
114
                        lowestSp = vendor['sellingPrice']
115
                    lowestOfferPrice = vendor['sellingPrice']
115
                    lowestOfferPrice = vendor['sellingPrice']
Line 151... Line 151...
151
        fkItem = FlipkartItem.get_by(item_id=flipkartItem.item_id)
151
        fkItem = FlipkartItem.get_by(item_id=flipkartItem.item_id)
152
        if fkItem is None:
152
        if fkItem is None:
153
            continue
153
            continue
154
        try:
154
        try:
155
            vendorsData = scraperFk.read(fkItem.flipkartSerialNumber.strip())
155
            vendorsData = scraperFk.read(fkItem.flipkartSerialNumber.strip())
156
            lowestSellerName = vendorsData['cheapestSeller']
156
            lowestSellerName = vendorsData['cheapestSeller'].decode("utf-8")
157
            lowestSellerSp = vendorsData['lowestSellingPrice']
157
            lowestSellerSp = vendorsData['lowestSellingPrice']
158
            ourSp = vendorsData['saholicSellingPrice']
158
            ourSp = vendorsData['saholicSellingPrice']
159
        except:
159
        except:
160
            continue
160
            continue
161
        finally:
161
        finally:
Line 201... Line 201...
201
        except:
201
        except:
202
            saholicPrice = 0.0
202
            saholicPrice = 0.0
203
        try:
203
        try:
204
            cheapestSeller = (amScraper.read(generalUrl, True))
204
            cheapestSeller = (amScraper.read(generalUrl, True))
205
            cheapestSellerPrice = cheapestSeller[0]
205
            cheapestSellerPrice = cheapestSeller[0]
206
            cheapestSellerName = cheapestSeller[1]
206
            cheapestSellerName = cheapestSeller[1].decode("utf-8")
207
        except:
207
        except:
208
            cheapestSellerPrice = 0.0
208
            cheapestSellerPrice = 0.0
209
            cheapestSellerName = ""
209
            cheapestSellerName = ""
210
        amazonItem.ourAmazonPrice = saholicPrice
210
        amazonItem.ourAmazonPrice = saholicPrice
211
        amazonItem.lowestAmazonPrice = cheapestSellerPrice
211
        amazonItem.lowestAmazonPrice = cheapestSellerPrice