def getCategory(self): # https://api.fptplay.net/api/v6.1_w/structure/vod token, timestamp = fpt.generate_stoken('structure/vod') url = '%s%sstructure/vod' % (fpt.domain, fpt.suffix) response = self.request.get(url, params={'st': token, 'e': timestamp}) return Category().get(response), None
def getLink(self, movie): # https://api.fptplay.net/api/v6.1_w/stream/vod/5d2413182089bd10412a0c92/1/auto_vip path = 'stream/vod/%s/auto_vip' % movie['link'] url = '%s%s%s' % (fpt.domain, fpt.suffix, path) token, timestamp = fpt.generate_stoken(path) response = self.request.get(url, params={'st': token, 'e': timestamp}) result = Movie().get_link(response) return result
def getChannel(self, channel, page=1): # https://api.fptplay.net/api/v6.1_w/vod?structure_id=55701c1517dc1321ee85857a&per_page=24&page=2 # if page > 1: token, timestamp = fpt.generate_stoken('vod') url = '%s%svod' % (fpt.domain, fpt.suffix) response = self.request.get(url, params={ 'st': token, 'e': timestamp, 'structure_id': channel, 'per_page': 24, 'page': page }) return Channel().get_page_ajax(response, page=page, domain=self.domain)