Subversion Repositories SmartDukaan

Rev

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

Rev 15829 Rev 17390
Line 149... Line 149...
149
        url = "http://www.snapdeal.com/acors/json/product/get/search/175/%d/20?q=&sort=bstslr&keyword=&clickSrc=&viewType=List&lang=en&snr=false" %(z)
149
        url = "http://www.snapdeal.com/acors/json/product/get/search/175/%d/20?q=&sort=bstslr&keyword=&clickSrc=&viewType=List&lang=en&snr=false" %(z)
150
        soup = getSoupObject(url)
150
        soup = getSoupObject(url)
151
        for product in soup.findAll('div',{'class':'outerImg'}):
151
        for product in soup.findAll('div',{'class':'outerImg'}):
152
            print product.find('a')['pogid']
152
            print product.find('a')['pogid']
153
            print product.find('a')['href']
153
            print product.find('a')['href']
-
 
154
            try:
154
            supcMap = fetchSupcDetails(product.find('a')['href'],rank, 3)
155
                supcMap = fetchSupcDetails(product.find('a')['href'],rank, 3)
-
 
156
            except:
-
 
157
                continue
155
            bestSellers.append(supcMap)
158
            bestSellers.append(supcMap)
156
            rank = rank + 1
159
            rank = rank + 1
157
 
160
 
158
def scrapeBestSellerTablets():
161
def scrapeBestSellerTablets():
159
    global bestSellers
162
    global bestSellers
Line 163... Line 166...
163
        url = "http://www.snapdeal.com/acors/json/product/get/search/133/%d/20?sort=bstslr&keyword=&clickSrc=&viewType=List&lang=en&snr=false" %(z)
166
        url = "http://www.snapdeal.com/acors/json/product/get/search/133/%d/20?sort=bstslr&keyword=&clickSrc=&viewType=List&lang=en&snr=false" %(z)
164
        soup = getSoupObject(url)
167
        soup = getSoupObject(url)
165
        for product in soup.findAll('div',{'class':'outerImg'}):
168
        for product in soup.findAll('div',{'class':'outerImg'}):
166
            print product.find('a')['pogid']
169
            print product.find('a')['pogid']
167
            print product.find('a')['href']
170
            print product.find('a')['href']
-
 
171
            try:
168
            supcMap = fetchSupcDetails(product.find('a')['href'],rank, 5)
172
                supcMap = fetchSupcDetails(product.find('a')['href'],rank, 5)
-
 
173
            except:
-
 
174
                continue
169
            bestSellers.append(supcMap)
175
            bestSellers.append(supcMap)
170
            rank = rank + 1
176
            rank = rank + 1
171
 
177
 
172
 
178
 
173
def resetRanks(category):
179
def resetRanks(category):