Subversion Repositories SmartDukaan

Rev

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

Rev 16095 Rev 16099
Line 31... Line 31...
31
            'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
31
            'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
32
            'Connection':'keep-alive'
32
            'Connection':'keep-alive'
33
        }
33
        }
34
now = datetime.now()
34
now = datetime.now()
35
mc = MemCache(options.mongoHost)
35
mc = MemCache(options.mongoHost)
36
sc = ShopCluesScraper.ShopCluesScraper()
36
sc = ShopCluesScraper.ShopCluesScraper(findThumbnail=True)
37
 
37
 
38
bundledProducts = []
38
bundledProducts = []
39
exceptionList = []
39
exceptionList = []
40
 
40
 
41
 
41
 
Line 143... Line 143...
143
                    int(uri[uri.rfind('-')+1:])
143
                    int(uri[uri.rfind('-')+1:])
144
                    uri =  uri[:uri.rfind('-')]
144
                    uri =  uri[:uri.rfind('-')]
145
                except:
145
                except:
146
                    pass
146
                    pass
147
                product = list(get_mongo_connection().Catalog.MasterData.find({'source_id':5,'marketPlaceUrl':{'$regex': uri}}))
147
                product = list(get_mongo_connection().Catalog.MasterData.find({'source_id':5,'marketPlaceUrl':{'$regex': uri}}))
148
                toBundle = __ProductInfo(scin, rank, link, productInfo['price'], productInfo['inStock'],productInfo['isCod'], productName, "" ,productInfo['coupon'])
148
                toBundle = __ProductInfo(scin, rank, link, productInfo['price'], productInfo['inStock'],productInfo['isCod'], productName, productInfo['thumbnail'] ,productInfo['coupon'])
149
                if len(product) > 0:
149
                if len(product) > 0:
150
                    bundleNewProduct(product[0], toBundle)
150
                    bundleNewProduct(product[0], toBundle)
151
                    try:
151
                    try:
152
                        recomputeDeal(product[0])
152
                        recomputeDeal(product[0])
153
                    except:
153
                    except:
Line 328... Line 328...
328
    <th>Url</th>
328
    <th>Url</th>
329
    <th>Available Price</th>
329
    <th>Available Price</th>
330
    <th>In Stock</th>
330
    <th>In Stock</th>
331
    <th>COD Available</th>
331
    <th>COD Available</th>
332
    <th>Coupon</th>
332
    <th>Coupon</th>
-
 
333
    <th>Thumbnail</th>
333
    </tr></thead>
334
    </tr></thead>
334
    <tbody>"""
335
    <tbody>"""
335
    for exceptionItem in exceptionList:
336
    for exceptionItem in exceptionList:
336
        message+="""<tr>
337
        message+="""<tr>
337
        <td style="text-align:center">"""+str(exceptionItem.identifier)+"""</td>
338
        <td style="text-align:center">"""+str(exceptionItem.identifier)+"""</td>
Line 340... Line 341...
340
        <td style="text-align:center">"""+(exceptionItem.url)+"""</td>
341
        <td style="text-align:center">"""+(exceptionItem.url)+"""</td>
341
        <td style="text-align:center">"""+str(exceptionItem.available_price)+"""</td>
342
        <td style="text-align:center">"""+str(exceptionItem.available_price)+"""</td>
342
        <td style="text-align:center">"""+str(exceptionItem.in_stock)+"""</td>
343
        <td style="text-align:center">"""+str(exceptionItem.in_stock)+"""</td>
343
        <td style="text-align:center">"""+str(exceptionItem.codAvailable)+"""</td>
344
        <td style="text-align:center">"""+str(exceptionItem.codAvailable)+"""</td>
344
        <td style="text-align:center">"""+str(exceptionItem.coupon)+"""</td>
345
        <td style="text-align:center">"""+str(exceptionItem.coupon)+"""</td>
-
 
346
        <td style="text-align:center">"""+(exceptionItem.thumbail)+"""</td>
345
        </tr>"""
347
        </tr>"""
346
    message+="""</tbody></table></body></html>"""
348
    message+="""</tbody></table></body></html>"""
347
    print message
349
    print message
348
    recipients = ['kshitij.sood@saholic.com']
350
    recipients = ['kshitij.sood@saholic.com']
349
    #recipients = ['rajneesh.arora@saholic.com','kshitij.sood@saholic.com','chaitnaya.vats@saholic.com','manoj.kumar@saholic.com']
351
    #recipients = ['rajneesh.arora@saholic.com','kshitij.sood@saholic.com','chaitnaya.vats@saholic.com','manoj.kumar@saholic.com']