Пример #1
0
 def getEpisodeList(self, url):
     contentType,main_page = common.getData(url)
     episodes = re.compile('<div class="right item_small " style="">.*?<a href="(.*?)".*?</span><img src="(.*?)".*?<a.*?>(.*?)<').findall(main_page)
     for url, img, title in episodes:
         contentType,page = common.getData(__BASE_URL__ + url + '/@@/video/flv_pl')
         titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
         if (len(titleMatches)) == 1:
             title = titleMatches[0][0]
             images = re.compile('<preview_pic>(.*?)</preview_pic>').findall(page)
             if (len(images)) >= 1:
                 iconImage = images[0]
             details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
             if (len(details)) > 0:
                 epiDetails = details[0]
             
             timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
             if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                 time = int(timeInSeconds[0]) / 60
             else:
                 time = '00:00'
             url = 'rtmp://waflaWBE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://i.walla.co.il/w9/swf/video_swf/vod/walla_vod_player_adt.swf?95 tcurl=rtmp://waflaWBE.walla.co.il/vod/ pageurl=http://walla.co.il/ playpath=' + re.compile('<src>(.*?)</src>').findall(page)[0]
             common.addLink(contentType,title, url, iconImage, str(time), epiDetails)
     nextPage = re.compile('<a class="in_blk p_r".*?href="(.*?)"').findall(main_page)
     if (len(nextPage)) > 0:
         common.addDir('UTF-8',__language__(30001), __BASE_URL__ + nextPage[0], self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png', __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #2
0
 def getGenere(self, url):
    
     params = common.getParams(url)
     selectedGenre = params["englishName"]
    
     categories = self.getMainJSON();
     
     i = 0
     for category in categories:
         #print "WALLA main category :" + str(category)
         categoryName = category["name"]
         
         genreEnglish = str(category["englishName"])
         
         genres = category["genres"]
         for genre in genres:
             
             genreName = genre["name"]
             if (genreEnglish==selectedGenre):
                 genreId = str(genre["id"])
                 amount = str(genre["amount"])
                 
                 dirName = genreName + " (" + amount + ")"
                 #iconImage = xbmc.translatePath(os.path.join(__PLUGIN_PATH__, 'cache', 'images', 'wallaBase', module + '.png'))
                 '''8515= ADULTS id'''
                 if adults or genreId != '8515': 
                     common.addDir('UTF-8', dirName, "genre=" + genreEnglish + "&genreId=" + genreId, self.MODES.GET_GENRE_ITEMS, elementId=__NAME__)
         
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #3
0
 def getSeriesList(self):
     ## get all the series base url
     contentType, baseUrl = common.getData(__BASE_URL__ + '?w=/2227')
     urls = re.compile(
         '<div class="bottomBorder"><a href="(.*?)".*?><img src="(.+?)" alt="(.+?)"'
     ).findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, image, title in urls:
         if path.startswith("http://"):
             contentType, page = common.getData(path)
             url = path
         else:
             contentType, page = common.getData(__BASE_URL__ + path)
             url = __BASE_URL__ + path
         iconImage = image
         fanartImage = re.compile(
             '</div><img src="(.+?)" width="940"').findall(page)
         if not fanartImage == None and len(fanartImage) > 0 and len(
                 fanartImage[0]) > 0:
             fanart = fanartImage[0]
         else:
             fanart = ''
         common.addDir(contentType, title, url,
                       self.MODES.GET_EPISODES_LIST, iconImage, __NAME__,
                       '', fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #4
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')
Пример #5
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2245')
     urls = re.compile('<div class="bottomBorder"><a href="(.*?)".*?><img src="(.+?)"').findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, image in urls:
         if path.startswith("http://"):
             contentType,page = common.getData(path)
         else:
             contentType,page = common.getData(__BASE_URL__ + path)
         details = re.compile('class="w3" style="margin-left:288px;">(\s.*)<div>(.*?)</div>(\s.*)<div>(.+?)<').findall(page)
         if (len(details)) > 0:
             summary = details[0][3]
         else:
             summary = ''
         iconImage = image
         fanartImage = re.compile('class="vbox720x330" src="(.+?)" alt="(.*?)"').findall(page)
         if not fanartImage == None:
             try:
                 fanart = fanartImage[0][0]
                 title = fanartImage[0][1]
             except:
                 title = fanartImage
             urlMatch = re.compile('class="hd1 mrg_r1 none" style=""><a href="(.+?)"').findall(page)
             if (len(urlMatch)) > 0:
                 common.addDir(contentType,title, __BASE_URL__ + urlMatch[0], self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary, fanart)                    
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')        
Пример #6
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2225')
     urls = re.compile('(<div class="img".*?</div>)').findall(baseUrl)
     for url in urls:
         items = re.compile('<a href="(.*?)".*?<img src="(.*?)".*?<span.*?>(.*?)<').findall(url)
         for path, image, title in items:
             if (path.find('2224') != -1):
                 contentType,page = common.getData(path + '/@@/video/flv_pl')
                 titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
                 if (len(titleMatches)) == 1:
                     title = titleMatches[0][0]
                     details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
                     if (len(details)) > 0:
                         epiDetails = details[0]
                 
                     timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
                     if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                         time = int(timeInSeconds[0]) / 60
                     else:
                         time = '00:00'
                     url = 'rtmp://waflaWNE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://isc.walla.co.il/w9/swf/video_swf/vod/walla_vod_player_adt.swf?275 pageUrl=' + path + ' playpath=' + re.compile('<src>(.*?)</src>').findall(page)[1]
                     common.addLink(contentType,title, url, image, str(time), epiDetails)
             else:
                 if not path.startswith("http://"):
                     path = __BASE_URL__ + path
                 common.addDir(contentType,title, path, self.MODES.GET_EPISODES_LIST, image, __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #7
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__)
Пример #8
0
 def getVod(self, url):
     contentType,page = common.getData(url)
     features = re.findall('<div class="topNav">(.*?)</div><span class="wcflow"', page)
     if features and len(features) > 0:
         menu = re.findall('href="(.*?)">(.*?)<', features[0])
         for href, name in menu:
             common.addDir(contentType,name, __BASE_URL__ + href, self.MODES.GET_EPISODES_LIST, "DefaultFolder.png", __NAME__)
Пример #9
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')
Пример #10
0
 def getSeriesList(self, url):
     ## get all the series base url
     contentType,baseUrl = common.getData(url)
     seriesBloc = re.compile('<ul class="fc sequence"(.*?)</ul>').findall(baseUrl)
     i = 1
     for item in seriesBloc:
         urls = re.compile('<li.*?data-json="{&quot;tooltipTitle&quot;:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?<a.*?href="(.*?)".*?class="img" src="(.*?)"').findall(item)
         for title, desc, url, img in urls:
             if i == 1:    
                 common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_EPISODES_LIST, img, __NAME__, desc)
             if i == 2:
                 episodeNum = re.compile('/(\d.*)').findall(url)[0]
                 contentType, page = common.getData('http://video2.walla.co.il/?w=null/null/' + episodeNum + '/@@/video/flv_pl')
                 titleMatches = re.compile('<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
                 if (len(titleMatches)) == 1:
                     title = titleMatches[0][0]
                     images = re.compile('<preview_pic>(.*?)</preview_pic>').findall(page)
                     if (len(images)) >= 1:
                         iconImage = images[0]
                     details = re.compile('<synopsis>(.*?)</synopsis>').findall(page)
                     if (len(details)) > 0:
                         epiDetails = details[0]
             
                     timeInSeconds = re.compile('<duration>(.*?)</duration>').findall(page)
                     if not timeInSeconds == None and not len(timeInSeconds[0]) <= 0:
                         time = int(timeInSeconds[0]) / 60
                     else:
                         time = '00:00'
                     playPath = re.compile('<src>(.*?)</src>').findall(page)
                     length = len(playPath)
                     #url = 'rtmp://waflaWBE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://isc.walla.co.il/w9/swf/video_swf/vod/WallaMediaPlayerAvod.swf tcurl=rtmp://waflaWBE.walla.co.il/vod/ pageurl=http://vod.walla.co.il' + url + ' playpath=' + playPath[length -1]
                     url='rtmp://waflaWNE.walla.co.il:1935/vod playpath' + playPath[length -1]+' swfUrl=http://i.walla.co.il/w9/swf/video_swf/vod/WallaMediaPlayerAvod.swf?testMode=1&v=436 pageUrl==http://vod.walla.co.il' + url
         i=i+1
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #11
0
    def getSeasons(self, url):

        print "walla getSeasons url:" + str(url)

        params = common.getParams(url)
        seriesId = str(params["seriesId"])

        contentType, page = common.getData(
            "http://ws.vod.walla.co.il/ws/mobile/android/tvshow?id=" +
            seriesId + "&page=1&limit=10&sort=newest")

        if common.__DEBUG__ == True:
            print "WALLA tvshow API "
            print page

        tvshow = json.loads(page)

        seasons = tvshow["episodesContainer"]
        for season in seasons:
            title = season["title"]
            seasonId = str(season["id"])
            common.addDir('UTF-8',
                          title,
                          "seasonId=" + seasonId,
                          self.MODES.GET_EPISODES_LIST,
                          elementId=__NAME__)
Пример #12
0
 def getSeriesList(self, url):
     ## get all the series base url
     contentType,baseUrl = common.getData(url)
     seriesBloc = re.compile('<ul class="fc sequence"(.*?)</ul>').findall(baseUrl)
     urls = re.compile('<li.*?data-json="{&quot;tooltipTitle&quot;:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?<a.*?href="(.*?)".*?class="img" src="(.*?)"').findall(baseUrl)
     for title, desc, url, img in urls:
         common.addDir(contentType, title, __BASE_URL__ + url, self.MODES.GET_EPISODES_LIST, img, __NAME__, desc)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #13
0
    def getEpisodes(self, url):

        params = common.getParams(url)
        seasonId = str(params["seasonId"])
        limit = 100
        if params.has_key("page"):
            page = int(params["page"])
        else:
            page = 1

        contentType, pageContent = common.getData(
            "http://ws.vod.walla.co.il/ws/mobile/android/episodes?id=" +
            seasonId + "&page=" + str(page) + "&limit=" + str(limit) +
            "&sort=newest")

        if common.__DEBUG__ == True:
            print "WALLA episodes API "
            print pageContent
        resultJSON = json.loads(pageContent)
        episodes = resultJSON["episodes"]

        # if we have 100 we might have another page - this is assumption there is not total items so we can't check for sure.
        if len(episodes) == 100:
            common.addDir('UTF-8',
                          "לדף הבא.....",
                          "page=" + str(page + 1) + "&seasonId=" + seasonId,
                          self.MODES.GET_EPISODES_LIST,
                          elementId=__NAME__)

        i = 1
        for episode in episodes:
            episodeId = str(episode["id"])
            title = "[COLOR yellow]" + str(
                (page * limit) - limit + i) + ".   [/COLOR]" + episode["title"]
            media = episode["media"]

            imageTypes = media["types"]
            image = imageTypes["type_29"]

            summary = ""
            if episode.has_key("abstract"):
                summary = episode["abstract"]
            elif episode.has_key("about"):
                summary = episode["about"]

            iconImage = __IMAGES_BASE__ + image["file"]

            common.addVideoLink("UTF-8",
                                title,
                                "item_id=" + episodeId,
                                self.MODES.PLAY_MODE,
                                iconImage,
                                elementId=__NAME__,
                                sum=summary)
            xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
            xbmc.executebuiltin("Container.SetViewMode(500)")
            i = i + 1
Пример #14
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2166')
     urls = re.compile('(<div class="img".*?</div>)').findall(baseUrl)
     for url in urls:
         items = re.compile('<a href="(.*?)".*?<img src="(.*?)".*?<span.*?>(.*?)<').findall(url)
         for path, image, title in items:
             if not path.startswith("http://"):
                 path = __BASE_URL__ + path
             common.addDir(contentType,title, path, self.MODES.GET_EPISODES_LIST, image, __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #15
0
 def getGenere(self, url):
     ## get all the series base url
     contentType, page = common.getData(url)
     genreBloc = re.compile('<nav class="sideNav".*?</nav>').findall(page)        
     genres = re.compile('<li.*?href="(.*?)".*?"text">(.*?)<').findall(genreBloc[0])
     i = 1
     for url, title in genres:
         if i > 1:
             common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_SERIES_LIST, 'DefaultFolder.png', __NAME__)
         i = i + 1
     
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(503)")
Пример #16
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__)
     urls = re.compile('class="opc".*?href="(.*?)".*?w3b">(.*?)<.*?src="(.*?)"').findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, title, img in urls:
         if path.startswith("http://"):
             url = path
         else:
             url = __BASE_URL__ + path
         common.addDir(contentType, title, url, self.MODES.GET_CHAPTERS, img, __NAME__)
                                    
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #17
0
 def getGenere(self, url):
     ## get all the series base url
     contentType, page = common.getData(url)
     genreBloc = re.compile('<nav class="sideNav".*?</nav>').findall(page)        
     genres = re.compile('<li.*?href="(.*?)".*?"text">(.*?)<').findall(genreBloc[0])
     i = 1
     for url, title in genres:
         if i > 1:
             common.addDir('UTF-8', title, __BASE_URL__ + url, self.MODES.GET_SERIES_LIST, 'DefaultFolder.png', __NAME__)
         i = i + 1
     
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(503)")
Пример #18
0
 def getSeriesList(self):
     
     try:
         ## 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('UTF-8',"ספיישל דייגו בספארי לבקשת הורי הפורום", __BASE_URL__ +'?w=//2562538', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
         common.addDir('UTF-8',"דייגו מציל את חיות הים --מיוחד לאבות מסורים", __BASE_URL__ +'?w=//2545366', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
         common.addDir('UTF-8',"הרפתקאות דורה ודייגו", __BASE_URL__ +'?w=//2505725', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
         
         xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     except Exception as e:
         print "WALLA exception in getSeriesList"
         raise 
Пример #19
0
 def getEpisodeList(self, url):
     contentType,main_page = common.getData(url)
     # check for seasons
     seasonsList = re.compile('<div class="drop".*?</div>').findall(main_page)
     if len(seasonsList) > 0:
         # we have seasons
         seasons = re.compile('<li>.*?href="(.*?)".*?</li>').findall(seasonsList[0])
         i = 1
         for season in seasons:
             common.addDir('UTF-8', __language__(30011) + ' ' + str(i), __BASE_URL__ + season, self.MODES.SHOW_EPISODES, '', __NAME__) 
             i = i + 1
     else:
         # we don't go directly to episodes
         self.showEpisodes(url)
Пример #20
0
 def getSeriesList(self):
     ## get all the series base url
     contentType, baseUrl = common.getData(__BASE_URL__ + '?w=/2161')
     urls = re.compile('(<div class="img".*?</div>)').findall(baseUrl)
     for url in urls:
         items = re.compile(
             '<a href="(.*?)".*?<img src="(.*?)".*?<span.*?>(.*?)<'
         ).findall(url)
         for path, image, title in items:
             if not path.startswith("http://"):
                 path = __BASE_URL__ + path
             common.addDir(contentType, title, path,
                           self.MODES.GET_EPISODES_LIST, image, __NAME__)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
     xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #21
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, baseUrl = common.getData(__BASE_URL__)
        urls = re.compile(
            'class="opc".*?href="(.*?)".*?w3b">(.*?)<.*?src="(.*?)"').findall(
                baseUrl)
        ## for each series we get the series page to parse all the info from
        for path, title, img in urls:
            if path.startswith("http://"):
                url = path
            else:
                url = __BASE_URL__ + path
            common.addDir(contentType, title, url, self.MODES.GET_CHAPTERS,
                          img, __NAME__)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #22
0
 def getGenereItems(self, url):
     print "walla getSeriesList url:" + str(url)
     
     params = common.getParams(url)
     genreId =  params["genreId"]
     genre = params["genre"]
     if params.has_key("page"):
         page = int(params["page"])
     else :
         page = 1
     
     contentType, jsonString = common.getData('http://ws.vod.walla.co.il/ws/mobile/android/genre/'+ genre + "?id=" + genreId + "&page=" + str(page) + "&limit=50&sort=newest")
     if  common.__DEBUG__ == True:
         print "WALLA genre API "
         print jsonString
         
     
     resultJSON = json.loads(jsonString)
     genreItems = resultJSON["events"]
     totalResults = resultJSON["genre"]["amount"]
     
     if totalResults> (50*page):
         page = page +1
         common.addDir('UTF-8', "לדף הבא.....", "page=" + str(page) + "&genre=" + genre + "&genreId=" + genreId, self.MODES.GET_GENRE_ITEMS, elementId=__NAME__)
     
     for item in genreItems:
         itemName = item["title"]
         if item.has_key("media"):
              media=item["media"]
         itemId = str(item["id"])
         typeName = item["typeName"]
         about = item["about"]
         if item.has_key("duration"):
             duration = str(item["duration"])
         else:
             duration = '0'
         if media["types"].has_key("type_29"):  
             iconImage = __IMAGES_BASE__ + media["types"]["type_29"]["file"]
         else:
             iconImage = 'DefaultFolder.png'     
         if typeName == "movie":
                            
             common.addVideoLink("UTF-8",itemName, "item_id="+ itemId ,self.MODES.PLAY_MODE, iconImage,elementId=__NAME__, sum=about,duration=duration)
         else:
            
             common.addDir('UTF-8', itemName, "seriesId=" + itemId , self.MODES.GET_SEASONS_LIST, iconImage, elementId=__NAME__)
Пример #23
0
 def getSeriesList(self):
         images=ReadList(images_file)
         contentType,block = common.getMatches(__BASE_URL__,'padding: 10px(.*?)folder2_game')
         page = re.compile('<a href="(.*?)".*?">(.*?)<').findall(block[0])
         for path in page:
             
             summary = ''
             iconImage=''
             url=__BASE_URL__ + path[0]
             if not url in images:
                    iconImage=common.getImageNick(url)
                    images[url]=iconImage
             iconImage=images[url]
             title=path[1]
             common.addDir(contentType,title, __BASE_URL__ + path[0], self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary)               
         WriteList(images_file, images)
         xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #24
0
    def getSeriesList(self):

        try:
            ## get all the series base url
            #block=re.compile('<div style="padding: 10px(.*?)folder2_game')
            contentType, block = common.getMatches(
                __BASE_URL__, 'padding: 10px(.*?)folder2_game')
            page = re.compile('<a href="(.*?)".*?0px;">(.*?)<').findall(
                block[0])
            #contentType,urls = common.getMatches(__BASE_URL__,'margin-left: 0px;">(.*?)</a><a href="(.*?)"')
            ## for each series we get the series page to parse all the info from
            idx = 1
            for path in page:

                print path
                #contentType,page = common.getData(__BASE_URL__ + path[0])
                #page = re.compile(__BASE_URL__ + path[0])
                #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 = ''
                title = path[1]
                '''if (len(titleMatches)) == 1:
                    title = titleMatches[0][0]'''
                iconImage = common.getImageNick(idx, 'nickjr',
                                                __BASE_URL__ + path[0])
                print iconImage
                idx = idx + 1
                '''urlMatch = re.compile('class="w6b" href="(.*?)">').findall(page)
                print urlMatch
                
                if (len(urlMatch)) > 0:'''
                common.addDir(contentType, title, __BASE_URL__ + path[0],
                              self.MODES.GET_EPISODES_LIST, iconImage,
                              __NAME__, summary)
            common.addDir('UTF-8', "ספיישל דייגו בספארי לבקשת הורי הפורום",
                          __BASE_URL__ + '?w=//2562538',
                          self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
            common.addDir('UTF-8',
                          "דייגו מציל את חיות הים --מיוחד לאבות מסורים",
                          __BASE_URL__ + '?w=//2545366',
                          self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
            common.addDir('UTF-8', "הרפתקאות דורה ודייגו",
                          __BASE_URL__ + '?w=//2505725',
                          self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)

            xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
        except Exception as e:
            print "WALLA exception in getSeriesList"
            raise
Пример #25
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')
Пример #26
0
 def getEpisodes(self, url):
     
     params = common.getParams(url)
     seasonId =  str(params["seasonId"])
     limit = 100
     if params.has_key("page"):
         page = int(params["page"])
     else :
         page = 1
     
     contentType, pageContent = common.getData("http://ws.vod.walla.co.il/ws/mobile/android/episodes?id=" + seasonId + "&page=" + str(page)  + "&limit=" + str(limit) + "&sort=newest")
   
     if  common.__DEBUG__ == True:
         print "WALLA episodes API "
         print pageContent
     resultJSON = json.loads(pageContent)
     episodes = resultJSON["episodes"]
     
     # if we have 100 we might have another page - this is assumption there is not total items so we can't check for sure.
     if len(episodes) == 100 :
         common.addDir('UTF-8', "לדף הבא.....", "page=" + str(page+1) + "&seasonId=" + seasonId , self.MODES.GET_EPISODES_LIST, elementId=__NAME__)
                 
     i=1
     for episode in episodes:
         episodeId = str(episode["id"])
         title = "[COLOR yellow]" + str((page*limit)-limit+i) + ".   [/COLOR]" + episode["title"] 
         media = episode["media"]
         
         imageTypes = media["types"]
         image = imageTypes["type_29"]
         
         summary = ""
         if episode.has_key("abstract"):
             summary = episode["abstract"]
         elif episode.has_key("about"):
             summary = episode["about"]
         
         iconImage = __IMAGES_BASE__ + image["file"]
         
         common.addVideoLink("UTF-8",title, "item_id="+ episodeId ,self.MODES.PLAY_MODE, iconImage,elementId=__NAME__, sum=summary)
         xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
         xbmc.executebuiltin("Container.SetViewMode(500)")
         i=i+1
Пример #27
0
 def getEpisodeList(self, url):
     contentType, main_page = common.getData(url)
     # check for seasons
     seasonsList = re.compile('<div class="drop".*?</div>').findall(
         main_page)
     if len(seasonsList) > 0:
         # we have seasons
         seasons = re.compile('<li>.*?href="(.*?)".*?</li>').findall(
             seasonsList[0])
         i = 1
         for season in seasons:
             common.addDir('UTF-8',
                           __language__(30011) + ' ' + str(i),
                           __BASE_URL__ + season, self.MODES.SHOW_EPISODES,
                           '', __NAME__)
             i = i + 1
     else:
         # we don't go directly to episodes
         self.showEpisodes(url)
Пример #28
0
 def getSeriesList(self):
     ## get all the series base url
     contentType,baseUrl = common.getData(__BASE_URL__ + '?w=/2227')
     urls = re.compile('<div class="bottomBorder"><a href="(.*?)".*?><img src="(.+?)" alt="(.+?)"').findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, image, title in urls:
         if path.startswith("http://"):
             contentType,page = common.getData(path)
             url = path
         else:
             contentType,page = common.getData(__BASE_URL__ + path)
             url = __BASE_URL__ + path
         iconImage = image
         fanartImage = re.compile('</div><img src="(.+?)" width="940"').findall(page)
         if not fanartImage == None and len(fanartImage) > 0 and len(fanartImage[0]) > 0:
             fanart = fanartImage[0]
         else:
             fanart = ''
         common.addDir(contentType,title, url, self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, '', fanart)                    
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')        
Пример #29
0
    def getSeriesList(self):
        images = ReadList(images_file)
        contentType, block = common.getMatches(
            __BASE_URL__, 'padding: 10px(.*?)folder2_game')
        page = re.compile('<a href="(.*?)".*?">(.*?)<').findall(block[0])
        for path in page:

            summary = ''
            iconImage = ''
            url = __BASE_URL__ + path[0]
            if not url in images:
                iconImage = common.getImageNick(url)
                images[url] = iconImage
            iconImage = images[url]
            title = path[1]
            common.addDir(contentType, title, __BASE_URL__ + path[0],
                          self.MODES.GET_EPISODES_LIST, iconImage, __NAME__,
                          summary)
        WriteList(images_file, images)
        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #30
0
    def getEpisodeList(self, url):
        contentType, main_page = common.getData(url)
        episodes = re.compile(
            '<div class="right item_small " style="">.*?<a href="(.*?)".*?</span><img src="(.*?)".*?<a.*?>(.*?)<'
        ).findall(main_page)
        for url, img, title in episodes:
            contentType, page = common.getData(__BASE_URL__ + url +
                                               '/@@/video/flv_pl')
            titleMatches = re.compile(
                '<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(page)
            if (len(titleMatches)) == 1:
                title = titleMatches[0][0]
                images = re.compile(
                    '<preview_pic>(.*?)</preview_pic>').findall(page)
                if (len(images)) >= 1:
                    iconImage = images[0]
                details = re.compile('<synopsis>(.*?)</synopsis>').findall(
                    page)
                if (len(details)) > 0:
                    epiDetails = details[0]

                timeInSeconds = re.compile(
                    '<duration>(.*?)</duration>').findall(page)
                if not timeInSeconds == None and not len(
                        timeInSeconds[0]) <= 0:
                    time = int(timeInSeconds[0]) / 60
                else:
                    time = '00:00'
                url = 'rtmp://waflaWBE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://i.walla.co.il/w9/swf/video_swf/vod/walla_vod_player_adt.swf?95 tcurl=rtmp://waflaWBE.walla.co.il/vod/ pageurl=http://walla.co.il/ playpath=' + re.compile(
                    '<src>(.*?)</src>').findall(page)[0]
                common.addLink(contentType, title, url, iconImage, str(time),
                               epiDetails)
        nextPage = re.compile('<a class="in_blk p_r".*?href="(.*?)"').findall(
            main_page)
        if (len(nextPage)) > 0:
            common.addDir('UTF-8', __language__(30001),
                          __BASE_URL__ + nextPage[0],
                          self.MODES.GET_EPISODES_LIST, 'DefaultFolder.png',
                          __NAME__)
        xbmcplugin.setContent(int(sys.argv[1]), 'episodes')
        xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #31
0
    def getSeriesList(self):
        ## get all the series base url
        contentType, baseUrl = common.getData(__BASE_URL__ + '?w=/2225')
        urls = re.compile('(<div class="img".*?</div>)').findall(baseUrl)
        for url in urls:
            items = re.compile(
                '<a href="(.*?)".*?<img src="(.*?)".*?<span.*?>(.*?)<'
            ).findall(url)
            for path, image, title in items:
                if (path.find('2224') != -1):
                    contentType, page = common.getData(path +
                                                       '/@@/video/flv_pl')
                    titleMatches = re.compile(
                        '<title>(.*?)</title>(.*)<subtitle>(.*?)<').findall(
                            page)
                    if (len(titleMatches)) == 1:
                        title = titleMatches[0][0]
                        details = re.compile(
                            '<synopsis>(.*?)</synopsis>').findall(page)
                        if (len(details)) > 0:
                            epiDetails = details[0]

                        timeInSeconds = re.compile(
                            '<duration>(.*?)</duration>').findall(page)
                        if not timeInSeconds == None and not len(
                                timeInSeconds[0]) <= 0:
                            time = int(timeInSeconds[0]) / 60
                        else:
                            time = '00:00'
                        url = 'rtmp://waflaWNE.walla.co.il/ app=vod/ swfvfy=true swfUrl=http://isc.walla.co.il/w9/swf/video_swf/vod/walla_vod_player_adt.swf?275 pageUrl=' + path + ' playpath=' + re.compile(
                            '<src>(.*?)</src>').findall(page)[1]
                        common.addLink(contentType, title, url, image,
                                       str(time), epiDetails)
                else:
                    if not path.startswith("http://"):
                        path = __BASE_URL__ + path
                    common.addDir(contentType, title, path,
                                  self.MODES.GET_EPISODES_LIST, image,
                                  __NAME__)
        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
        xbmc.executebuiltin("Container.SetViewMode(500)")
Пример #32
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__)
Пример #33
0
    def getSeriesList(self):
        images = ReadList(images_file)
        contentType, block = common.getMatches(
            __BASE_URL__, 'padding: 10px(.*?)folder2_game')
        page = re.compile('<a href="(.*?)".*?0px;">(.*?)<').findall(block[0])
        print str(images)
        for path in page:
            summary = ''
            iconImage = ''
            url = __BASE_URL__ + path[0]
            if not url in images:
                iconImage = common.getImageNick(url)
                images[url] = iconImage
            iconImage = images[url]
            title = path[1]
            common.addDir(contentType, title, url,
                          self.MODES.GET_EPISODES_LIST, iconImage, __NAME__,
                          summary)
        WriteList(images_file, images)
        common.addDir('UTF-8', "דורה ביער המכושף",
                      __BASE_URL__ + '?w=//1887291',
                      self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
        common.addDir('UTF-8', "ספיישל דורה", __BASE_URL__ + '?w=//2630476',
                      self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)

        xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #34
0
  def getSeriesList(self):
 
      try:
          ## get all the series base url
          #block=re.compile('<div style="padding: 10px(.*?)folder2_game')
          contentType,block = common.getMatches(__BASE_URL__,'padding: 10px(.*?)folder2_game')
          page = re.compile('<a href="(.*?)".*?">(.*?)<').findall(block[0])
          #contentType,urls = common.getMatches(__BASE_URL__,'margin-left: 0px;">(.*?)</a><a href="(.*?)"')
          ## for each series we get the series page to parse all the info from
          idx=1
          for path in page:
              
              print path
              #contentType,page = common.getData(__BASE_URL__ + path[0])
              #page = re.compile(__BASE_URL__ + path[0])
              #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 = ''
              title=path[1]
              '''if (len(titleMatches)) == 1:
                  title = titleMatches[0][0]'''
              iconImage =common.getImageNick(idx,'nick',__BASE_URL__ + path[0])
              print iconImage
              idx=idx + 1
              '''urlMatch = re.compile('class="w6b" href="(.*?)">').findall(page)
              print urlMatch
              
              if (len(urlMatch)) > 0:'''
              common.addDir(contentType,title, __BASE_URL__ + path[0], self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary)               
          
          xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
      except Exception as e:
          print "WALLA exception in getSeriesList"
          raise 
Пример #35
0
    def getSeriesList(self):

        try:
            ## 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('UTF-8', "ספיישל דייגו בספארי לבקשת הורי הפורום",
                          __BASE_URL__ + '?w=//2562538',
                          self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
            common.addDir('UTF-8',
                          "דייגו מציל את חיות הים --מיוחד לאבות מסורים",
                          __BASE_URL__ + '?w=//2545366',
                          self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
            common.addDir('UTF-8', "הרפתקאות דורה ודייגו",
                          __BASE_URL__ + '?w=//2505725',
                          self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)

            xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
        except Exception as e:
            print "WALLA exception in getSeriesList"
            raise
Пример #36
0
   def getSeasons(self, url):
       
       
       print "walla getSeasons url:" + str(url)
       
       params = common.getParams(url)
       seriesId =  str(params["seriesId"])
      
       
       contentType, page = common.getData("http://ws.vod.walla.co.il/ws/mobile/android/tvshow?id=" + seriesId + "&page=1&limit=10&sort=newest")
       
       if  common.__DEBUG__ == True:
           print "WALLA tvshow API "
           print page
          
       tvshow = json.loads(page)
 
       seasons = tvshow["episodesContainer"]
       for season in seasons:
           title = season["title"]
           seasonId = str(season["id"])
           common.addDir('UTF-8', title, "seasonId=" + seasonId , self.MODES.GET_EPISODES_LIST, elementId=__NAME__)
Пример #37
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')
Пример #38
0
 def getSeriesList(self):
     ## get all the series base url
     contentType, baseUrl = common.getData(__BASE_URL__ + '?w=/2245')
     urls = re.compile(
         '<div class="bottomBorder"><a href="(.*?)".*?><img src="(.+?)"'
     ).findall(baseUrl)
     ## for each series we get the series page to parse all the info from
     for path, image in urls:
         if path.startswith("http://"):
             contentType, page = common.getData(path)
         else:
             contentType, page = common.getData(__BASE_URL__ + path)
         details = re.compile(
             'class="w3" style="margin-left:288px;">(\s.*)<div>(.*?)</div>(\s.*)<div>(.+?)<'
         ).findall(page)
         if (len(details)) > 0:
             summary = details[0][3]
         else:
             summary = ''
         iconImage = image
         fanartImage = re.compile(
             'class="vbox720x330" src="(.+?)" alt="(.*?)"').findall(page)
         if not fanartImage == None:
             try:
                 fanart = fanartImage[0][0]
                 title = fanartImage[0][1]
             except:
                 title = fanartImage
             urlMatch = re.compile(
                 'class="hd1 mrg_r1 none" style=""><a href="(.+?)"'
             ).findall(page)
             if (len(urlMatch)) > 0:
                 common.addDir(contentType, title,
                               __BASE_URL__ + urlMatch[0],
                               self.MODES.GET_EPISODES_LIST, iconImage,
                               __NAME__, summary, fanart)
     xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #39
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')
Пример #40
0
 def getSeriesList(self):
         images=ReadList(images_file)
         contentType,block = common.getMatches(__BASE_URL__,'padding: 10px(.*?)folder2_game')
         page = re.compile('<a href="(.*?)".*?0px;">(.*?)<').findall(block[0])
         print str (images)
         for path in page:
             summary = ''
             iconImage=''
             url=__BASE_URL__ + path[0]
             if not url in images:
                    iconImage=common.getImageNick(url)
                    images[url]=iconImage
             iconImage=images[url]
             title=path[1]
             common.addDir(contentType,title,url, self.MODES.GET_EPISODES_LIST, iconImage, __NAME__, summary)
         WriteList(images_file, images)
         common.addDir('UTF-8',"דורה ביער המכושף", __BASE_URL__ +'?w=//1887291', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
         common.addDir('UTF-8',"ספיישל דורה", __BASE_URL__ +'?w=//2630476', self.MODES.GET_EPISODES_LIST, "", __NAME__, summary)
         
         
         xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')
Пример #41
0
 def getContent(self):
     ## Add the VOD item
     common.addDir('UTF-8',__language__(40006), __BASE_URL__ + "?w=/@vod", self.MODES.GET_VOD, "DefaultFolder.png", __NAME__)
     common.addDir('UTF-8',__language__(40007), __BASE_URL__ + "?w=/@live", self.MODES.GET_LIVE, "DefaultFolder.png", __NAME__)