示例#1
0
 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__)
示例#2
0
 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__)
示例#3
0
 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__)
示例#4
0
 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__)
示例#5
0
 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__)
示例#6
0
 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)
示例#7
0
 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__)
示例#8
0
 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)