Ejemplo n.º 1
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, urls = common.getMatches(
            __BASE_URL__, '<a id="opc".*?href="(.*?)">(.*?)<')
        ## for each series we get the series page to parse all the info from
        for path in urls:
            if path[0].startswith("http://"):
                contentType, page = common.getData(path[0])
            else:
                contentType, page = common.getData(__BASE_URL__ + path[0])
            title = path[1]
            imageMatch = re.compile(
                'class="stripe_title w7b white">(.*?)img\ssrc="(.*?)"'
            ).findall(page)
            details = re.compile('class="w3 nohvr">(.*?)<').findall(page)
            if (len(details)) > 0:
                summary = details[0]
            else:
                summary = ''
            if (len(imageMatch)) == 1:
                iconImage = common.getImage(imageMatch[0][1], __NAME__)
                urlMatch = re.compile(
                    'class="w6b fntclr2" href="(.*?)">').findall(page)
                if (len(urlMatch)) > 0:
                    common.addDir(contentType, title,
                                  __BASE_URL__ + urlMatch[0],
                                  self.MODES.GET_EPISODES_LIST, iconImage,
                                  __NAME__, summary)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 2
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, urls = common.getMatches(
            __BASE_URL__,
            '<a class="block w3 fldevt goldsep red bold" href="(.+?)" onclick="Evt\(this,(\d),&quot;(.+?)&quot;,3,&quot;folder_new_prakim_melaim'
        )
        ## for each series we get the series page to parse all the info from
        for path, num, title in urls:  ## num is not used and does nothing.
            if path.startswith("http://"):
                contentType, page = common.getData(path)
                url = path
            else:
                contentType, page = common.getData(__BASE_URL__ + path)
                url = __BASE_URL__ + path

            sumMatch = re.compile('class="w3">(.*?)<').findall(page)
            iconImage = re.compile('class="top_pic" src="(.+?)"').findall(page)
            fanart = xbmc.translatePath(
                os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                             'curtains.png'))
            if not iconImage == None and len(iconImage) > 0 and len(
                    iconImage[0]) > 0:
                iconImage = common.getImage(iconImage[0], __NAME__)
            else:
                iconImage = ''
            if (len(sumMatch)) == 1:
                summary = sumMatch[0]
                common.addDir(contentType, title, url,
                              self.MODES.GET_EPISODES_LIST, iconImage,
                              __NAME__, summary, fanart)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 3
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,urls = common.getMatches(__BASE_URL__,'<a id="opc" href="(.*?)"')
     ## for each series we get the series page to parse all the info from
     for path in urls:
         contentType,page = common.getData(__BASE_URL__ + path)
         titleMatches = re.compile('class="stripe_title w7b white">\s*(.*?)\s*</h1>\s*<img src="(.*?)"').findall(page)
         if len(titleMatches) == 0:
             # try a different possibility
             titleMatches = re.compile('class="stripe_title w7b white">.*?>(.*?)<.*?src="(.*?)"').findall(page)
         details = re.compile('class="w3 nohvr" style="line-height:17px;">(.*?)<').findall(page)
         if (len(details)) > 0:
             summary = details[0]
         else:
             summary = ''
         if (len(titleMatches)) == 1:
             title = titleMatches[0][0]
             iconImage = common.getImage(titleMatches[0][1],__NAME__)
             urlMatch = re.compile('class="w6b" href="(.*?)">').findall(page)
             if (len(urlMatch)) > 0:
                 common.addDir(contentType,title, __BASE_URL__ + urlMatch[0], self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary)
     common.addDir(contentType,"ספיישל דייגו בספארי לבקשת הורי הפורום", __BASE_URL__ +'?w=//2562538', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
     common.addDir(contentType,"דייגו מציל את חיות הים --מיוחד לאבות מסורים", __BASE_URL__ +'?w=//2545366', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
     common.addDir(contentType,"הרפתקאות דורה ודייגו", __BASE_URL__ +'?w=//2505725', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
     
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 4
0
 def getSeriesList(self, genre):
     if genre == '100':
         ## handle movies
         categories={'7373':30007,'7396':30008, '7397':30009, '7367':30010}
         for url, titleNLS in categories.iteritems():
             title = common.__language__(titleNLS)
             iconImage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'images', 'icon_' + str(titleNLS) + '.png'))
             if not os.path.exists(iconImage):
                 iconImage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'fanart_' + str(titleNLS) + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('UTF-8',title, url, self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, '', fanart)
     else:
         ## get all the series that have full episodes
         contentType,matches = common.getMatches('http://yes.walla.co.il/?w=0/7701','id="(\d+)" href="" onclick="itemsFetchRows\(this.id,' + str(genre) + ',0\); return\(false\);">(.+?)<')                
         for url, name in matches:
             iconimage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'images', 'icon_' + name + '.png'))
             if not os.path.exists(iconimage):
                 iconimage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'fanart_' + name + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('windows-1255', name, str(genre) + '/' + url, self.MODES.GET_EPISODES_LIST, iconimage, __NAME__, '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 5
0
 def getSeriesList(self, genre):
     if genre == '100':
         ## handle movies
         categories = {
             '7373': 30007,
             '7396': 30008,
             '7397': 30009,
             '7367': 30010
         }
         for url, titleNLS in categories.iteritems():
             title = common.__language__(titleNLS)
             iconImage = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'images',
                              'icon_' + str(titleNLS) + '.png'))
             if not os.path.exists(iconImage):
                 iconImage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                              'fanart_' + str(titleNLS) + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('UTF-8', title, url,
                           self.MODES.GET_EPISODES_LIST, iconImage,
                           __NAME__, '', fanart)
     else:
         ## get all the series that have full episodes
         contentType, matches = common.getMatches(
             'http://yes.walla.co.il/?w=0/7701',
             'id="(\d+)" href="" onclick="itemsFetchRows\(this.id,' +
             str(genre) + ',0\); return\(false\);">(.+?)<')
         for url, name in matches:
             iconimage = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'images',
                              'icon_' + name + '.png'))
             if not os.path.exists(iconimage):
                 iconimage = 'DefaultFolder.png'
             fanart = xbmc.translatePath(
                 os.path.join(__PLUGIN_PATH__, 'resources', 'bg',
                              'fanart_' + name + '.png'))
             if not os.path.exists(fanart):
                 fanart = 'DefaultFolder.png'
             common.addDir('windows-1255', name,
                           str(genre) + '/' + url,
                           self.MODES.GET_EPISODES_LIST, iconimage,
                           __NAME__, '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 6
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, urls = common.getMatches(__BASE_URL__,
                                              '<a id="opc" href="(.*?)"')
        ## for each series we get the series page to parse all the info from
        for path in urls:
            contentType, page = common.getData(__BASE_URL__ + path)
            titleMatches = re.compile(
                'class="stripe_title w7b white">\s*(.*?)\s*</h1>\s*<img src="(.*?)"'
            ).findall(page)
            if len(titleMatches) == 0:
                # try a different possibility
                titleMatches = re.compile(
                    'class="stripe_title w7b white">.*?>(.*?)<.*?src="(.*?)"'
                ).findall(page)
            details = re.compile(
                'class="w3 nohvr" style="line-height:17px;">(.*?)<').findall(
                    page)
            if (len(details)) > 0:
                summary = details[0]
            else:
                summary = ''
            if (len(titleMatches)) == 1:
                title = titleMatches[0][0]
                iconImage = common.getImage(titleMatches[0][1], __NAME__)
                urlMatch = re.compile('class="w6b" href="(.*?)">').findall(
                    page)
                if (len(urlMatch)) > 0:
                    common.addDir(contentType, title,
                                  __BASE_URL__ + urlMatch[0],
                                  self.MODES.GET_EPISODES_LIST, iconImage,
                                  __NAME__, summary)
        common.addDir(contentType, "ספיישל דייגו בספארי לבקשת הורי הפורום",
                      __BASE_URL__ + '?w=//2562538',
                      self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
        common.addDir(contentType,
                      "דייגו מציל את חיות הים --מיוחד לאבות מסורים",
                      __BASE_URL__ + '?w=//2545366',
                      self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
        common.addDir(contentType, "הרפתקאות דורה ודייגו",
                      __BASE_URL__ + '?w=//2505725',
                      self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 7
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)
Ejemplo n.º 8
0
 def getEpisodeList(self, url, page='0'):
     if page == None:            
         page = '0'
     if url.find("/") == -1:
         detailUrl = 'http://yes.walla.co.il/?w=1/' + url + '/' + page + '/10/@ajaxItems'
         mypattern = '<a href="" onclick="itemsFetchRows\((\d+)\); return false;"><img align="absmiddle" src=".*?" class="prevPage"'
     else:
         detailUrl = 'http://yes.walla.co.il/?w=' + url + '/' + page + '/@Ajax_display_full_chapters'
         constants = url.split('/')
         mypattern = '<a href="" onclick="itemsFetchRows\(' + constants[1] + ',' + constants[0] + ',(\d+)\); return false;"><img align="absmiddle" src=".*?" class="prevPage"'
         
     common.getEpisodeList(__BASE_URL__, detailUrl, __PATTERN__, __NAME__, self.MODES.GET_EPISODES_LIST, __PATTERN_FEATURED__, __PATTERN_MORE__)
     contentType,hasNext = common.getMatches(detailUrl, mypattern)
     if not hasNext == None and len(hasNext) > 0:
         # there is a next page
         page = hasNext[0]
         self.addDir(common.__language__(30001), url, page)
     xbmc.executebuiltin("Container.SetViewMode(500)")
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 9
0
    def getEpisodeList(self, url, page='0'):
        if page == None:
            page = '0'
        if url.find("/") == -1:
            detailUrl = 'http://yes.walla.co.il/?w=1/' + url + '/' + page + '/10/@ajaxItems'
            mypattern = '<a href="" onclick="itemsFetchRows\((\d+)\); return false;"><img align="absmiddle" src=".*?" class="prevPage"'
        else:
            detailUrl = 'http://yes.walla.co.il/?w=' + url + '/' + page + '/@Ajax_display_full_chapters'
            constants = url.split('/')
            mypattern = '<a href="" onclick="itemsFetchRows\(' + constants[
                1] + ',' + constants[
                    0] + ',(\d+)\); return false;"><img align="absmiddle" src=".*?" class="prevPage"'

        common.getEpisodeList(__BASE_URL__, detailUrl, __PATTERN__, __NAME__,
                              self.MODES.GET_EPISODES_LIST,
                              __PATTERN_FEATURED__, __PATTERN_MORE__)
        contentType, hasNext = common.getMatches(detailUrl, mypattern)
        if not hasNext == None and len(hasNext) > 0:
            # there is a next page
            page = hasNext[0]
            self.addDir(common.__language__(30001), url, page)
        xbmc.executebuiltin("Container.SetViewMode(500)")
        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 10
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)
Ejemplo n.º 11
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,urls = common.getMatches(__BASE_URL__,'<a id="opc".*?href="(.*?)">(.*?)<')
     ## for each series we get the series page to parse all the info from
     for path in urls:
         if path[0].startswith("http://"):
             contentType,page = common.getData(path[0])
         else:
             contentType,page = common.getData(__BASE_URL__ + path[0])
         title = path[1]
         imageMatch = re.compile('class="stripe_title w7b white">(.*?)img\ssrc="(.*?)"').findall(page)
         details = re.compile('class="w3 nohvr">(.*?)<').findall(page)
         if (len(details)) > 0:
             summary = details[0]
         else:
             summary = ''
         if (len(imageMatch)) == 1:
             iconImage = common.getImage(imageMatch[0][1], __NAME__)
             urlMatch = re.compile('class="w6b fntclr2" href="(.*?)">').findall(page)
             if (len(urlMatch)) > 0:
                 common.addDir(contentType,title, __BASE_URL__ + urlMatch[0], self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary)                    
         
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Ejemplo n.º 12
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,urls = common.getMatches(__BASE_URL__,'<a class="block w3 fldevt goldsep red bold" href="(.+?)" onclick="Evt\(this,(\d),&quot;(.+?)&quot;,3,&quot;folder_new_prakim_melaim')
     ## for each series we get the series page to parse all the info from
     for path, num, title in urls: ## num is not used and does nothing.
         if path.startswith("http://"):
             contentType,page = common.getData(path)
             url = path
         else:
             contentType,page = common.getData(__BASE_URL__ + path)
             url = __BASE_URL__ + path
         
         sumMatch = re.compile('class="w3">(.*?)<').findall(page)
         iconImage = re.compile('class="top_pic" src="(.+?)"').findall(page)
         fanart = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'resources', 'bg', 'curtains.png'))
         if not iconImage == None and len(iconImage) > 0 and len(iconImage[0]) > 0:                
             iconImage = common.getImage(iconImage[0], __NAME__)
         else:
             iconImage = ''
         if (len(sumMatch)) == 1:
             summary = sumMatch[0]
             common.addDir(contentType,title, url, self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary, fanart)                    
         
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')