• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python wallacommon.getData函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中wallacommon.getData函数的典型用法代码示例。如果您正苦于以下问题:Python getData函数的具体用法?Python getData怎么用?Python getData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getData函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: getSeriesList

 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)")
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:29,代码来源:module_2225.py


示例2: getEpisodeList

 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)")
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:27,代码来源:module_2225.py


示例3: getSeriesList

 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')        
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:27,代码来源:module_2245.py


示例4: getSeriesList

 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)")
开发者ID:AMIR27,项目名称:xbmc-israel,代码行数:35,代码来源:module_338.py


示例5: getEpisodeList

 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)")
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:29,代码来源:module_318.py


示例6: getSeriesList

 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 
开发者ID:roeiba,项目名称:xbmc,代码行数:31,代码来源:module_nickjr.py


示例7: getVod

 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__)
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:7,代码来源:module_dor.py


示例8: getChapterList

 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__)
开发者ID:roeiba,项目名称:xbmc,代码行数:7,代码来源:module_junior.py


示例9: play_video

    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
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:16,代码来源:module_mtv.py


示例10: getMainJSON

    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;
开发者ID:Doug4421,项目名称:xbmc-israel,代码行数:9,代码来源:module_wallavod.py


示例11: getSeriesList

 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)")
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:9,代码来源:module_318.py


示例12: playEpisode

 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)
开发者ID:Doug4421,项目名称:xbmc-israel,代码行数:43,代码来源:module_wallavod.py


示例13: getSeriesList

 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')        
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:20,代码来源:module_2227.py


示例14: getSeriesList

 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)")
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:12,代码来源:module_2166.py


示例15: getGenere

 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)")
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:13,代码来源:module_000002.py


示例16: getSeriesList

 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')
开发者ID:roeiba,项目名称:xbmc,代码行数:13,代码来源:module_junior.py


示例17: getSeriesList

 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')
开发者ID:roeiba,项目名称:xbmc,代码行数:23,代码来源:module_nick.py


示例18: getEpisodeList

 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)
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:14,代码来源:module_000002.py


示例19: getSeriesList

 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')
开发者ID:samikadosh,项目名称:xbmc-israel,代码行数:24,代码来源:module_viva.py


示例20: getGenereItems

 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__)
开发者ID:Doug4421,项目名称:xbmc-israel,代码行数:46,代码来源:module_wallavod.py



注:本文中的wallacommon.getData函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python wallet.pw_decode函数代码示例发布时间:2022-05-26
下一篇:
Python args_parser.parse函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap