Esempio n. 1
0
    def getEpisodeList(self, url):
        contentType, page = common.getData(url)
        if url.find('page') == -1:
            featured = re.compile(
                '<a class="thumblink" href="(.+?)".*?src="(.+?)".*?alt="(.+?)"'
            ).findall(page)
            for url, image, title in featured:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType, title, url,
                                    self.MODES.PLAY_ITEM, image, __NAME__)

        items = re.compile(
            '<div class="entry-content-inside">.*?<a href="(.+?)" title="(.*?)".*?src="(.+?)"'
        ).findall(page)
        for url, title, image in items:
            if url.find('article') == -1:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType, title, url,
                                    self.MODES.PLAY_ITEM, image, __NAME__)

        hasNext = re.compile(
            'class=\'next page-numbers\' href=\'(.+?)\'').findall(page)
        if not hasNext == None and len(hasNext) > 0:
            # there is a next page
            url = hasNext[0]
            common.addDir('UTF-8', common.__language__(30001), url,
                          self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png',
                          __NAME__)
Esempio n. 2
0
 def getCategories(self):
     categories = [
         ['/news/new-music/', 40001, self.MODES.GET_EPISODES_LIST],
         ['/music/mtv-playlist/', 40002, self.MODES.GET_SERIES_LIST],
         ['/charts/', 40003, self.MODES.GET_SERIES_LIST],
         ['/shows/browse/', 40004, self.MODES.GET_SERIES_LIST],
         ['/music/live-session/', 40005, self.MODES.GET_EPISODES_LIST]
     ]
     for item in categories:
         title = common.__language__(item[1])
         url = item[0]
         mode = item[2]
         iconImage = xbmc.translatePath(
             os.path.join(__PLUGIN_PATH__, 'resources', 'images',
                          'icon_' + str(item[1]) + '.png'))
         if not os.path.exists(iconImage):
             iconImage = 'DefaultFolder.png'
         fanart = xbmc.translatePath(
             os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                          'fanart_' + str(item[1]) + '.png'))
         if not os.path.exists(fanart):
             fanart = 'DefaultFolder.png'
         common.addDir('UTF-8', title, __BASE_URL__ + url, mode, iconImage,
                       __NAME__, '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Esempio n. 3
0
 def getMoreChapters(self, url, currentpage, title):
     numOfpages = len(common.getMatches(url, 'id="page_\d" href="(.+?)&page=(\d)" class="pages"'))
     if not currentpage == None and not currentpage == '':
         # we have at least to pages... if numOfPages is nothing it means that there are only two pages
         # we need to add the first page to the count
         if numOfpages == None or numOfpages == 0:
             numOfpages = 1;
         else:
             numOfpages += 1;
         currentPage = int(currentpage)
         if not (numOfpages == (currentPage - 1)):
             page = str(currentPage + 1)
             if not url.find("&page") == -1:
                 url = url.strip("&page=" + str(currentPage))
             self.addDir(common.__language__(30001), url + '&page=' + page, page)
     else :
         if not numOfpages == None and not numOfpages == 0:
             page = str(2) # second page
             self.addDir(common.__language__(30001), url + '&page=' + page, page)
Esempio n. 4
0
 def getCategories(self):
     categories = [['/news/new-music/',40001,self.MODES.GET_EPISODES_LIST], 
                   ['/music/mtv-playlist/',40002,self.MODES.GET_SERIES_LIST],
                   ['/charts/',40003,self.MODES.GET_SERIES_LIST],
                   ['/shows/browse/',40004,self.MODES.GET_SERIES_LIST],
                   ['/music/live-session/',40005,self.MODES.GET_EPISODES_LIST]]
     for item in categories:
         title = common.__language__(item[1])
         url = item[0]
         mode = item[2]
         iconImage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'images', 'icon_' + str(item[1]) + '.png'))
         if not os.path.exists(iconImage):
             iconImage = 'DefaultFolder.png'
         fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'fanart_' + str(item[1]) + '.png'))
         if not os.path.exists(fanart):
             fanart = 'DefaultFolder.png'
         common.addDir('UTF-8',title, __BASE_URL__ + url, mode, iconImage, __NAME__, '', fanart)   
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Esempio n. 5
0
    def getEpisodeList(self, url):
        contentType,page = common.getData(url)
        if url.find('page') == -1:
            featured = re.compile('<a class="thumblink" href="(.+?)".*?src="(.+?)".*?alt="(.+?)"').findall(page)
            for url, image, title in featured:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType,title, url, self.MODES.PLAY_ITEM, image, __NAME__)

        items = re.compile('<div class="entry-content-inside">.*?<a href="(.+?)" title="(.*?)".*?src="(.+?)"').findall(page)
        for url, title, image in items:                
            if url.find('article') == -1:
                title = title.replace('<br/>', ' - ')
                title = title.replace('|', ' - ')
                common.addVideoLink(contentType,title, url, self.MODES.PLAY_ITEM, image, __NAME__)

        hasNext = re.compile('class=\'next page-numbers\' href=\'(.+?)\'').findall(page)
        if not hasNext == None and len(hasNext) > 0:
            # there is a next page
            url = hasNext[0]
            common.addDir('UTF-8',common.__language__(30001), url, self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png', __NAME__)