Exemplo n.º 1
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)")
Exemplo n.º 2
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)")
Exemplo n.º 3
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)")
Exemplo n.º 4
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')        
Exemplo n.º 5
0
 def getEpisodeList(self, url):
     contentType,main_page = common.getData(url)
     episodeList = re.compile('<ol class="episode-list".*?</ol>').findall(main_page)
     episodes = re.compile('data-json.*?tooltipTitle&quot;:&quot;(.*?)&.*?:&quot;(.*?)&quot;.*?:&quot;(.*?)&.*?href="(.*?)"').findall(episodeList[0])
     for title, summary, img, url in episodes:
         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'
             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="(.*?)" style=""></a>').findall(main_page)
     if (len(nextPage)) > 0:
         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)")
Exemplo n.º 6
0
    def play_video(self, url, name):
        contentType,page = common.getData(url)
        videoId = re.compile('<embed.*?src=".+?(\d+)"').findall(page)
        if len(videoId) > 0:
            contentType,movieData = common.getData(__CLIP_DATA__ + videoId[0], 0)
            videoUrl = re.compile('<src>(.+?)</src>').findall(movieData)
            length = len(videoUrl)
            if length > 0:
                playUrl = videoUrl[0] + ' swfurl=http://intl.esperanto.mtvi.com/player/js/swfobject_2_2/expressInstall.swf swfvfy=true'#.replace('rtmpe', 'rtmp')
                listItem = xbmcgui.ListItem(name, 'DefaultFolder.png', 'DefaultFolder.png', path=playUrl) # + '|' + 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
                listItem.setInfo(type='Video', infoLabels={ "Title": urllib.unquote(name)})
                listItem.setProperty('IsPlayable', 'true')
                xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=listItem)
            
        
## http://intl.esperanto.mtvi.com/www/xml/media/mediaGen.jhtml?uri=mgid:uma:video:mtv.co.il:648596
Exemplo n.º 7
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 
Exemplo n.º 8
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__)
Exemplo n.º 9
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__)
Exemplo n.º 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)
     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)")
Exemplo n.º 11
0
    def getMainJSON(self):

        contentType, page = common.getData('http://ws.vod.walla.co.il/ws/mobile/android/toolbar')
        if  common.__DEBUG__ == True:
            print "WALLA API main"
            print page
            
        prms=json.loads(page)
        return prms;
Exemplo n.º 12
0
 def playEpisode(self,url):
     
     try:
         #report to google about use of the addon
         contentType, jsonString = common.getData("http://goo.gl/saJsOc")        
     except:
         pass
      
     params = common.getParams(url)
     itemId =  str(params["item_id"])
     print itemId
     #http://ws.walla.co.il/flvpl/?id=2810721&type=json&device=android
     contentType, page = common.getData("http://ws.walla.co.il/flvpl/?id=" + itemId +"&type=json&device=android")
     if  common.__DEBUG__ == True:
         print "WALLA players API "
         print page
     resultJSON = json.loads(page)
     item = resultJSON["items"]["item"]
     subtitlesUrl = None
     if item.has_key("subtitles") :
         
         subtitles = item["subtitles"]["subtitle"]
         firstitem = subtitles[0]
         print firstitem
         subtitlesUrl = firstitem["src"]
         
         print "subtitleUrl=" + subtitlesUrl
         
     videoUrl = resultJSON["video_src_ipad"]
     #videoSrc = item["src"]
     #videoUrl = "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 playpath=" + videoSrc
     
     duration = item["duration"]
     title = item["title"]
     
     
     listItem = xbmcgui.ListItem(title, 'DefaultFolder.png', 'DefaultFolder.png', path=videoUrl) # + '|' + 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
     listItem.setInfo(type='Video', infoLabels={ "Title": title,"Duration":str(duration)})
     listItem.setProperty('IsPlayable', 'true')
     xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=listItem)
     
     if subtitlesUrl:
         self.downloadSubtitles(subtitlesUrl)
Exemplo n.º 13
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')        
Exemplo n.º 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)")
Exemplo n.º 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)")
Exemplo n.º 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')
Exemplo n.º 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)")
Exemplo n.º 18
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)")
Exemplo n.º 19
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')
Exemplo n.º 20
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)
Exemplo n.º 21
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')
Exemplo n.º 22
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
Exemplo n.º 23
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)")
Exemplo n.º 24
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')
Exemplo n.º 25
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')
Exemplo n.º 26
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__)
Exemplo n.º 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)
Exemplo n.º 28
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
Exemplo n.º 29
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__)
Exemplo n.º 30
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__)
Exemplo n.º 31
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__)
Exemplo n.º 32
0
 def getEpisodeList(self, url):
     contentType,page = common.getData(url)
     episodes = re.findall('<div class="right navRowItem"><div><a href="(.*?)@vod"><img src="(.*?)".*?vod">(.*?)<.*?vod">(.*?)<', page)
     for href, img, name, summary in episodes:
         common.addVideoLink(contentType,name, href, self.MODES.PLAY_VIDEO, img, __NAME__, summary)
Exemplo n.º 33
0
 def getLive(self, url):
     contentType,page = common.getData(url)
     cameras = re.findall('id="camera_div_(\d)" rel="(.*?)"><img src="(.*?)"', page)
     for camId, cameraName, image in cameras:
         href = 'rtmp://waflalive.walla.co.il/livestreamcast_edge?tuid=undefined&un=undefined&ait=undefined&wkeys=undefined&divname=undefined&provider=undefined&location=undefined&channel_name=undefined playpath=s_feedvilla' + camId + ' live=true swfUrl=http://i.walla.co.il/w9/swf/video_swf/live/streamcast_nextGen.swf?10 pageUrl=http://dor.walla.co.il/?w=/@live'
         common.addVideoLink(contentType,cameraName, href, self.MODES.PLAY_VIDEO, image, __NAME__)