def search(self, text): # text = urllib.quote_plus(text) url = "%s/searchajax" % self.domain response = Request().post(url, params={ 'search': text }) return Channel().search_result(response)
def getChannel(self, channel, page=1): channel = channel.replace(self.domain, "") if page > 1: channel = re.sub(r'i(\d+).html', 'i%d.html' % page, channel) url = '%s%s' % (self.domain, channel) else: url = '%s%s' % (self.domain, channel) response = Request().get(url) return Channel().get(response, page)
def getCategory(self): response = Request().get(self.domain) return Category().get(response), Channel().getTop(response)
def search(self, text): text = urllib.quote_plus(text) url = "%s/search-phim-%s.html" % (self.domain, text) response = Request().get(url) return Channel().get(response, 1)