Subversion Repositories SmartDukaan

Rev

Rev 5291 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5291 Rev 6166
Line 76... Line 76...
76
        
76
        
77
        current_max = int(tab_info[0].find('span').string)
77
        current_max = int(tab_info[0].find('span').string)
78
        total = int(tab_info[1].string)
78
        total = int(tab_info[1].string)
79
        
79
        
80
        if len(self.phones) > 0:
80
        if len(self.phones) > 0:
-
 
81
            category = ''
-
 
82
            if self.url.find('/tablet') != -1 :
-
 
83
                category = 'mobiles/tablet-20278/'
-
 
84
            elif self.url.find('/all-camcorder') != -1 :
-
 
85
                category = 'cameras/all-camcorder/'  
-
 
86
            elif self.url.find('/all-slr') != -1 :
-
 
87
                category = 'cameras/all-slr/'
-
 
88
            elif self.url.find('/all-point-shoot') != -1 :
-
 
89
                category = 'cameras/all-point-shoot/'
-
 
90
            else :
-
 
91
                category = 'mobiles/all/'
-
 
92
            
-
 
93
            base_url = 'http://www.flipkart.com/' + category
81
            base_url = 'http://www.flipkart.com/mobiles/%s' % ('all/' if self.phones[0]['product_url'].find('/tablets/') == -1 else 'tablet-20278/')
94
            #base_url = 'http://www.flipkart.com/mobiles/%s' % ('all/' if self.phones[0]['product_url'].find('/tablets/') == -1 else 'tablet-20278/')
82
            
95
            
83
            if current_max < total:
96
            if current_max < total:
84
                return base_url + str(1 + (current_max / 20))
97
                return base_url + str(1 + (current_max / 20))
85
            else:
98
            else:
86
                return None
99
                return None