Subversion Repositories SmartDukaan

Rev

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

Rev 16101 Rev 16102
Line 16... Line 16...
16
parser = optparse.OptionParser()
16
parser = optparse.OptionParser()
17
parser.add_option("-m", "--m", dest="mongoHost",
17
parser.add_option("-m", "--m", dest="mongoHost",
18
                      default="localhost",
18
                      default="localhost",
19
                      type="string", help="The HOST where the mongo server is running",
19
                      type="string", help="The HOST where the mongo server is running",
20
                      metavar="mongo_host")
20
                      metavar="mongo_host")
-
 
21
parser.add_option("-r", "--reset", dest="reset",
-
 
22
                   default="False", type="string",
-
 
23
                   help="Reset Ranks?")
21
 
24
 
22
(options, args) = parser.parse_args()
25
(options, args) = parser.parse_args()
23
 
26
 
24
SOURCE_MAP = {'AMAZON':1,'FLIPKART':2,'SNAPDEAL':3,'SAHOLIC':4, 'SHOPCLUES.COM':5}
27
SOURCE_MAP = {'AMAZON':1,'FLIPKART':2,'SNAPDEAL':3,'SAHOLIC':4, 'SHOPCLUES.COM':5}
25
bestSellers = []
28
bestSellers = []
Line 341... Line 344...
341
        <td style="text-align:center">"""+(exceptionItem.url)+"""</td>
344
        <td style="text-align:center">"""+(exceptionItem.url)+"""</td>
342
        <td style="text-align:center">"""+str(exceptionItem.available_price)+"""</td>
345
        <td style="text-align:center">"""+str(exceptionItem.available_price)+"""</td>
343
        <td style="text-align:center">"""+str(exceptionItem.in_stock)+"""</td>
346
        <td style="text-align:center">"""+str(exceptionItem.in_stock)+"""</td>
344
        <td style="text-align:center">"""+str(exceptionItem.codAvailable)+"""</td>
347
        <td style="text-align:center">"""+str(exceptionItem.codAvailable)+"""</td>
345
        <td style="text-align:center">"""+str(exceptionItem.coupon)+"""</td>
348
        <td style="text-align:center">"""+str(exceptionItem.coupon)+"""</td>
346
        <td style="text-align:center">"""+(exceptionItem.thumbnail)+"""</td>
349
        <td style="text-align:left">"""+(exceptionItem.thumbnail)+"""</td>
347
        </tr>"""
350
        </tr>"""
348
    message+="""</tbody></table></body></html>"""
351
    message+="""</tbody></table></body></html>"""
349
    print message
352
    print message
350
    recipients = ['kshitij.sood@saholic.com']
353
    recipients = ['kshitij.sood@saholic.com']
351
    #recipients = ['rajneesh.arora@saholic.com','kshitij.sood@saholic.com','chaitnaya.vats@saholic.com','manoj.kumar@saholic.com']
354
    #recipients = ['rajneesh.arora@saholic.com','kshitij.sood@saholic.com','chaitnaya.vats@saholic.com','manoj.kumar@saholic.com']
Line 371... Line 374...
371
    
374
    
372
        
375
        
373
 
376
 
374
def main():
377
def main():
375
    scrapeBestSellers()
378
    scrapeBestSellers()
-
 
379
    if len(bundledProducts)>0 or len(exceptionList) > 0:
376
    sendMail()
380
        sendMail()
377
        
381
        
378
if __name__=='__main__':
382
if __name__=='__main__':
379
    main()
383
    main()
380
384