Subversion Repositories SmartDukaan

Rev

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

Rev 13844 Rev 13847
Line 29... Line 29...
29
 
29
 
30
def updatePrices():
30
def updatePrices():
31
    snapdealBestSellers = list(get_mongo_connection().Catalog.MasterData.find({'rank':{'$gt':0},'source_id':3}))
31
    snapdealBestSellers = list(get_mongo_connection().Catalog.MasterData.find({'rank':{'$gt':0},'source_id':3}))
32
    for data in snapdealBestSellers:
32
    for data in snapdealBestSellers:
33
        print data['identifier']
33
        print data['identifier']
34
        if data['identifier'] is None or len(data['identifier'])==0:
34
        if data['identifier'] is None or len(data['identifier'].strip())==0:
35
            print "continue"
35
            print "continue"
36
            continue
36
            continue
37
        url="http://www.snapdeal.com/acors/json/gvbps?supc=%s&catId=175&sort=sellingPrice"%(data['identifier'])
37
        url="http://www.snapdeal.com/acors/json/gvbps?supc=%s&catId=175&sort=sellingPrice"%(data['identifier'])
38
        print url
38
        print url
39
        time.sleep(1)
39
        time.sleep(1)