예제 #1
0
    def query(self):
        if isinstance(c.site, DefaultSR):
            sr_ids = Subreddit.user_subreddits(c.user)
            return normalized_rising(sr_ids)
        elif isinstance(c.site, MultiReddit):
            return normalized_rising(c.site.kept_sr_ids)

        return get_rising(c.site)
예제 #2
0
    def query(self):
        if isinstance(c.site, DefaultSR):
            sr_ids = Subreddit.user_subreddits(c.user)
            return normalized_rising(sr_ids)
        elif isinstance(c.site, MultiReddit):
            return normalized_rising(c.site.kept_sr_ids)

        return get_rising(c.site)
예제 #3
0
    def query(self):
        sort = NewMenu.operator(self.sort)

        if not sort: # rising
            names = get_rising(c.site)
            return names
        else:
            q = Link._query(sort = sort, read_cache = True,
                            *c.site.query_rules() )
            self.collect_stats = True
            return q
예제 #4
0
    def query(self):
        links = get_rising(c.site)

        if not links:
            # just pull from the new page if the rising page isn't
            # populated for some reason
            links = c.site.get_links('new', 'all')
            if isinstance(links, Query):
                links._limit = 200
                links = [x._fullname for x in links]
        
        random.shuffle(links)

        return links
예제 #5
0
    def query(self):
        links = get_rising(c.site)

        if not links:
            # just pull from the new page if the rising page isn't
            # populated for some reason
            links = c.site.get_links('new', 'all')
            if isinstance(links, Query):
                links._limit = 200
                links = [x._fullname for x in links]

        random.shuffle(links)

        return links
예제 #6
0
 def query(self):
     return get_rising(c.site)
예제 #7
0
 def query(self):
     if self.sort == 'rising':
         return get_rising(c.site)
     else:
         return c.site.get_links('new', 'all')
예제 #8
0
 def query(self):
     if self.sort == 'rising':
         return get_rising(c.site)
     else:
         return c.site.get_links('new', 'all')
예제 #9
0
 def query(self):
     return get_rising(c.site)
 def query(self):
     res = None
     if self.sort == 'rising':
         res = get_rising(c.site)
     return res or c.site.get_links('new', 'all')
예제 #11
0
 def query(self):
     if self.sort == "rising":
         return get_rising(c.site)
     else:
         return c.site.get_links("new", "all")
예제 #12
0
    def query(self):
        if self.sort == 'rising':
            return get_rising(c.site)
        else:
	    print "Getting links for %s" % c.site
            return c.site.get_links('new', 'all')
 def query(self):
     res = None
     if self.sort == 'rising':
         res = get_rising(c.site)
     return res or c.site.get_links('new', 'all')