def getChannel(self, channel, page=1): channel = channel.replace(self.domain, "") if page > 1: url = '%s%spage/%d' % (self.domain, channel, page) else: url = '%s%s' % (self.domain, channel) response = Request().get(url) return Channel().get(response, page)
def search(self, text): text = urllib.quote_plus(text) url = "%s/search/%s" % (self.domain, text) response = Request().get(url) return Channel().get(response, 1)
def getCategory(self): response = Request().get(self.domain) return Category().get(response), Channel().get(response, 1)