def search(self, text): url = "%ssearch/%s" % (self.domain, urllib.quote_plus(text)) response = self.request.get(url, cookies=self.cookie, headers={ 'Referer': 'http://tvhay.org/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36' }) return Channel().get(response, 1)
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 = self.request.get(url, cookies=self.cookie) return Channel().get(response, page)
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 = self.request.get(url, cookies=self.cookie, headers={ 'Referer': 'http://tvhay.org/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36' }) return Channel().get(response, page)
def getCategory(self): response = self.request.get( '%s/phim-le/' % self.domain, cookies=self.cookie, headers={ 'Referer': 'http://tvhay.org/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36' }) return Category().get(response), Channel().get(response, 1)
def search(self, text): url = "%s/search/%s" % (self.domain, urllib.quote_plus(text)) response = self.request.get(url, cookies=self.cookie) return Channel().get(response, 1)
def getCategory(self): response = self.request.get('%s/phim-le/' % self.domain, cookies=self.cookie) return Category().get(response), Channel().get(response, 1)