当前位置: 首页>>代码示例>>Python>>正文


Python wallacommon.getData函数代码示例

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


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


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