def fetch_channels(self, start): ret = {} if self.tag == TAG_HOT: ret = fmlib.get_hot_chls(start=start, limit=self.__limit) elif self.tag == TAG_FAST: ret = fmlib.get_uptrending_chls(start=start, limit=self.__limit) elif self.tag == TAG_GENRE: ret = fmlib.get_genre_chls(genre_id=self.__genre_id, start=start, limit=self.__limit) elif self.tag == TAG_SEARCH: ret = fmlib.get_search_chls(keyword=self.__keyword, start=start, limit=self.__limit) return ret
def fetch_banner_channels(self): ret = fmlib.get_hot_chls(start=random.randrange(100, 1500, 5), limit=5) return ret.get("data", {}).get("channels", [])
def fetch_banner_channels(self): start = random.randrange(0, 25, 5) ret = fmlib.get_hot_chls(start=start, limit=5) return ret.get("data", {}).get("channels", [])