Subversion Repositories SmartDukaan

Rev

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

Rev 17039 Rev 17040
Line 120... Line 120...
120
 
120
 
121
    
121
    
122
def scrapeBestSellerMobiles():
122
def scrapeBestSellerMobiles():
123
    global bestSellers
123
    global bestSellers
124
    rank = 0
124
    rank = 0
-
 
125
    bestSellers = []
125
    print "Homeshop18 Best Sellers Mobiles..."
126
    print "Homeshop18 Best Sellers Mobiles..."
126
    for i in range(0,5):
127
    for i in range(0,5):
127
        mobileCategoryUrl = 'http://www.homeshop18.com/mobile-phones/categoryid:14569/search:/sort:Popularity/inStock:%28%22true%22%29/start:'+str(i*24)+'/?lazy=true'
128
        mobileCategoryUrl = 'http://www.homeshop18.com/mobile-phones/categoryid:14569/search:/sort:Popularity/inStock:%28%22true%22%29/start:'+str(i*24)+'/?lazy=true'
128
        #mobileCategoryUrl = "http://m.homeshop18.com/search.mobi?categoryId=14569&isAjax=true&page="+str(i)+"&csrf="+csrfValue
129
        #mobileCategoryUrl = "http://m.homeshop18.com/search.mobi?categoryId=14569&isAjax=true&page="+str(i)+"&csrf="+csrfValue
129
        data = fetchResponseUsingProxy(mobileCategoryUrl, proxy=False )
130
        data = fetchResponseUsingProxy(mobileCategoryUrl, proxy=False )
Line 148... Line 149...
148
            bestSellers.append(r_info)   
149
            bestSellers.append(r_info)   
149
                
150
                
150
def scrapeBestSellerTablets():
151
def scrapeBestSellerTablets():
151
    global bestSellers
152
    global bestSellers
152
    rank = 0
153
    rank = 0
-
 
154
    bestSellers = []
153
    print "Homeshop18 Best Sellers Tablets..."
155
    print "Homeshop18 Best Sellers Tablets..."
154
    for i in range(0,5):
156
    for i in range(0,5):
155
        tabletCategoryUrl = 'http://www.homeshop18.com/tablets/categoryid:8937/search:Tablets/sort:Popularity/inStock:%28%22true%22%29/start:'+str(i*24)+'/?lazy=true'
157
        tabletCategoryUrl = 'http://www.homeshop18.com/tablets/categoryid:8937/search:Tablets/sort:Popularity/inStock:%28%22true%22%29/start:'+str(i*24)+'/?lazy=true'
156
        data = fetchResponseUsingProxy(tabletCategoryUrl)
158
        data = fetchResponseUsingProxy(tabletCategoryUrl)
157
        soup = BeautifulSoup(data)
159
        soup = BeautifulSoup(data)