def getChannel(self, channel, page=1): channel = channel.replace(self.domain, "") if page > 1: url = '%s%s/page/%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/wp-json/dooplay/search/" % self.domain response = Request().get(url, params={ 'keyword': text, 'nonce': '1b88282004' }) return Channel().search_result(response)
def search(self, text): text = urllib.quote_plus(text) url = "%s/wp-admin/admin-ajax.php" % self.domain response = Request().post(url, params={ 'action': 'ajaxsearchpro_search', 'asid': 1, 'asp_inst_id': '1_1', 'aspp': text, 'options': 'current_page_id=64113&qtranslate_lang=0&asp_gen%5B%5D=title&asp_gen%5B%5D=content&customset%5B%5D=page&customset%5B%5D=post' }) return Channel().search_result(response)
def getCategory(self): response = Request().get(self.domain) return Category().get(response), Channel().get(response, 1)