def work(self, mode, url='', name='', page=''): if (mode == self.MODES.GET_SERIES_LIST): self.getSeriesList() elif (mode == self.MODES.GET_EPISODES_LIST): common.getEpisodeList(__BASE_URL__, url, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, __PATTERN_FEATURED__)
def getChapterList(self, url): ## get all the series base url contentType,baseUrl = common.getData(url) print baseUrl menuItems = re.compile('<div class="right channel_wrap">.*?href="(.*?)"').findall(baseUrl) chapterUrl = __BASE_URL__ + menuItems[1] common.getEpisodeList(__BASE_URL__, chapterUrl, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, __PATTERN_FEATURED__, __PATTERN_MORE__)
def work(self, mode, url='', name='', page=''): if (mode==self.MODES.GET_SERIES_LIST): self.getSeriesList() elif(mode==self.MODES.GET_CHAPTERS): self.getChapterList(url) elif(mode==self.MODES.GET_EPISODES_LIST): common.getEpisodeList(__BASE_URL__, url, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, __PATTERN_FEATURED__, __PATTERN_MORE__)
def getSeriesList(self): ## get all the series base url contentType, baseUrl = common.getData(__BASE_URL__) urls = re.compile('<a class="in_blk tbBtn" href="\/(.+?)"').findall( baseUrl) url = urls[0] ## first is the url we need. common.getEpisodeList(__BASE_URL__, __BASE_URL__ + url, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, __PATTERN_FEATURED__)
def getChapterList(self, url): ## get all the series base url contentType, baseUrl = common.getData(url) print baseUrl menuItems = re.compile( '<div class="right channel_wrap">.*?href="(.*?)"').findall(baseUrl) chapterUrl = __BASE_URL__ + menuItems[1] common.getEpisodeList(__BASE_URL__, chapterUrl, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, __PATTERN_FEATURED__, __PATTERN_MORE__)
def work(self, mode, url='', name='', page=''): if(mode==self.MODES.GET_CONTENT): self.getContent() elif (mode==self.MODES.GET_VOD): self.getVod(url) elif (mode==self.MODES.GET_LIVE): self.getLive(url) elif(mode==self.MODES.GET_EPISODES_LIST): common.getEpisodeList(__BASE_URL__, url, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, '', __PATTERN_MORE__) elif(mode==self.MODES.PLAY_VIDEO): self.playLive(url, name)
def getSeriesList(self): ## get all the series base url contentType,baseUrl = common.getData(__BASE_URL__) urls = re.compile('<a class="in_blk tbBtn" href="\/(.+?)"').findall(baseUrl) url = urls[0] ## first is the url we need. common.getEpisodeList(__BASE_URL__, __BASE_URL__ + url, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, __PATTERN_FEATURED__)
def work(self, mode, url='', name='', page=''): if (mode==self.MODES.GET_SERIES_LIST): self.getSeriesList() elif(mode==self.MODES.GET_EPISODES_LIST): common.getEpisodeList(__BASE_URL__, url, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST)