Subversion Repositories SmartDukaan

Rev

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

Rev 4198 Rev 5291
Line 16... Line 16...
16
        except Exception:
16
        except Exception:
17
            return None
17
            return None
18
    
18
    
19
    def __str__(self):
19
    def __str__(self):
20
        return '%s (%s)' % (self.url, self.source)
20
        return '%s (%s)' % (self.url, self.source)
21
 
21
    
-
 
22
    def __unicode__(self):
-
 
23
        return '%s (%s)' % (self.url, self.source)
22
 
24
 
23
class URLQueue:
25
class URLQueue:
24
 
26
 
25
    def __init__(self):
27
    def __init__(self):
26
        self.urls = [
28
        self.urls = [
27
            URL('http://www.flipkart.com/mobiles/all/'),
29
            URL('http://www.flipkart.com/mobiles/all/'),
28
            URL('http://www.letsbuy.com/mobile-phones-mobiles-c-254_88?perpage=192'),
30
            URL('http://www.snapdeal.com/json/product/get/search/175/0/20?q=&sort=plrty&keyword='),
29
            URL('http://www.infibeam.com/Mobiles/search'),
31
            URL('http://www.infibeam.com/Mobiles/search'),
30
            URL('http://www.homeshop18.com/gsm-handsets/category:3027/'),
32
            URL('http://www.homeshop18.com/gsm-handsets/category:3027/'),
31
            URL('http://www.flipkart.com/mobiles/tablet-20278'),
33
            URL('http://www.flipkart.com/mobiles/tablet-20278'),
32
            URL('http://www.letsbuy.com/mobile-phones-tablets-c-254_393?perpage=192'),
34
            URL('http://www.snapdeal.com/json/product/get/search/133/0/20?q=&sort=plrty&keyword='),
33
            URL('http://www.homeshop18.com/ipads-2f-tablets/category:8937/'),
35
            URL('http://www.homeshop18.com/ipads-2f-tablets/category:8937/'),
34
            URL('http://www.adexmart.com/modules/coremanager/modules/filtersearch/filtersearch.json.php?act=filter&ident=16&page=1&perpage=1000&orderby=newest&orderway=desc')
36
            #URL('http://www.adexmart.com/modules/coremanager/modules/filtersearch/filtersearch.json.php?act=filter&ident=16&page=1&perpage=1000&orderby=newest&orderway=desc')
35
        ]
37
        ]
36
    
38
    
37
    def enqueue(self, url):
39
    def enqueue(self, url):
38
        
40
        
39
        if url is not None:
41
        if url is not None: