本文整理汇总了Python中resources.libs.main.addPlayMs函数的典型用法代码示例。如果您正苦于以下问题:Python addPlayMs函数的具体用法?Python addPlayMs怎么用?Python addPlayMs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addPlayMs函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: ESPNList
def ESPNList(murl):
if 'http://espn.go.com/video/' in murl:
lurl=murl
xurl=re.findall('(.+?)&pageNum=',murl)[0]
else:
lurl='http://espn.go.com/video/format/libraryPlaylist?categoryid='+murl
xurl='http://espn.go.com/video/format/libraryPlaylist?categoryid='+murl
link=main.OPENURL(lurl)
match=re.compile('<a href="([^<]+)"><img src="(.+?)".+?></a><h5>(.+?)</h5>',re.DOTALL).findall(link)
dialogWait = xbmcgui.DialogProgress()
ret = dialogWait.create('Please wait until Sports list is loaded.')
totalLinks = len(match)
loadedLinks = 0
remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
dialogWait.update(0,'[B]Loading....[/B]',remaining_display)
for url,thumb,name in match:
main.addPlayMs(name,url,46,thumb,'','','','','')
loadedLinks = loadedLinks + 1
percent = (loadedLinks * 100)/totalLinks
remaining_display = 'Videos loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
dialogWait.update(percent,'[B]Loading....[/B]',remaining_display)
if (dialogWait.iscanceled()):
return False
dialogWait.close()
del dialogWait
match=re.compile('class="page-numbers">(\d+) of (\d+)</div>',re.DOTALL).findall(link)
for p1,p2 in match:
continue
if p1 != p2:
purl=xurl+ "&pageNum=" + str(int(p1)) + "&sortBy=&assetURL=http://assets.espn.go.com&module=LibraryPlaylist&pagename=vhub_index"
main.addDir('[COLOR blue]Next[/COLOR] Page '+p1+' of '+p2,purl,45,art+'/next2.png')
main.GA("ESPN","ESPN-List")
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:33,代码来源:espn.py
示例2: LISTBB
def LISTBB(murl):
main.GA("BodyBuilding","List")
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('img src="http://assets.bodybuilding.com','')
match=re.compile('''img src="(.+?)".+? title="(.+?)" /></a>.+?<h3>.+?<a href=\'(.+?)'> .+? </a>.+?Muscle Targeted:.+?> (.+?) </a>''').findall(link)
for thumb,name,url,body in match:
main.addPlayMs(name+" [COLOR red]"+body+"[/COLOR]",url,197,thumb,'','','','','')
开发者ID:rollysalvana,项目名称:pampereo-xbmc-plugins,代码行数:7,代码来源:bodybuilding.py
示例3: subLink
def subLink(mname, suburl):
match = re.compile("<sublink>(.+?)</sublink>").findall(suburl)
for url in match:
match6 = re.compile("http://(.+?)/.+?").findall(url)
for url2 in match6:
host = (
url2.replace("www.", "")
.replace(".in", "")
.replace(".net", "")
.replace(".com", "")
.replace(".to", "")
.replace(".org", "")
.replace(".ch", "")
)
if re.findall("\d+.\d+.\d+.\d+", host):
host = "Static"
main.addPlayMs(
mname + " [COLOR blue]" + host.upper() + "[/COLOR]",
url,
240,
art + "/hosts/" + host.lower() + ".png",
"",
art + "/hosts/" + host.lower() + ".png",
"",
"",
"",
)
开发者ID:alejusar,项目名称:starthere,代码行数:27,代码来源:customchannel.py
示例4: LISTWB
def LISTWB(murl):
furl='http://staticswf.kidswb.com/kidswb/xml/videofeedlight.xml'
link=main.OPENURL(furl)
link=link.replace('"','').replace(''','').replace('×','').replace('&','').replace('‘','').replace('–','').replace('“','').replace('”','').replace('—','').replace('&','&').replace("`",'')
match = re.compile('<item><media:title>([^<]+)</media:title><media:description>([^<]+)</media:description><guid isPermaLink="false">([^<]+)</guid><av:show season="1">'+murl+'</av:show><media:thumbnail url="([^<]+)"/></item>').findall(link)
for name,desc,url,thumb in match:
main.addPlayMs(name,url,79,thumb,desc,'','','','')
开发者ID:alejusar,项目名称:starthere,代码行数:7,代码来源:wbkids.py
示例5: LIST
def LIST(murl):
main.GA("DocumentaryWire", "List")
link = main.OPENURL(murl)
link = main.unescapes(link)
r = re.findall(
"""<div class="loop-content switchable-view grid-small" data-view="grid-small">(.+?)<div class=\'wp-pagenavi\'>""",
link,
)
if r:
match = re.compile(
'<div class="thumb"><a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>'
).findall(r[0])
else:
match = re.compile(
'<div class="thumb"><a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>'
).findall(link)
for name, url, thumb, desc in match:
main.addPlayMs(name, url, 228, thumb, desc, "", "", "", "")
paginate = re.compile("""'extend'>...</span><a href=\'(.+?)\' class="next">Next.+?</a>""").findall(link)
if len(paginate) == 0:
paginate = re.compile(
"""<div class='wp-pagenavi'>.+?class='page larger'>[^\&]+</a><a href=\'([^\&]+)\' class="next">Next.+?</a>"""
).findall(link)
if len(paginate) > 0:
for purl in paginate:
main.addDir("[COLOR blue]Next[/COLOR]", purl, 227, art + "/next2.png")
开发者ID:himag1,项目名称:MashUp,代码行数:26,代码来源:documentarywire.py
示例6: SEARCH
def SEARCH(murl):
if murl == "s12dnm":
keyb = xbmc.Keyboard("", "Search Documentaries")
keyb.doModal()
if keyb.isConfirmed():
search = keyb.getText()
encode = urllib.quote(search)
surl = "http://www.documentarywire.com/?s=" + encode
else:
surl = murl
link = main.OPENURL(surl)
link = main.unescapes(link)
match = re.compile(
'<a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>'
).findall(link)
for name, url, thumb, desc in match:
main.addPlayMs(name, url, 228, thumb, desc, "", "", "", "")
paginate = re.compile("""'extend'>...</span><a href=\'(.+?)\' class="next">Next.+?</a>""").findall(link)
if len(paginate) == 0:
paginate = re.compile(
"""<div class='wp-pagenavi'>.+?class='page larger'>[^\&]+</a><a href=\'([^\&]+)\' class="next">Next.+?</a>"""
).findall(link)
if len(paginate) > 0:
for purl in paginate:
main.addDir("[COLOR blue]Next[/COLOR]", purl, 229, art + "/next2.png")
开发者ID:himag1,项目名称:MashUp,代码行数:25,代码来源:documentarywire.py
示例7: VIPList
def VIPList(mname,murl):
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
r=re.findall('<poster>(.+?)</poster>',link)
if r:
vip=r[0]
else:
vip='Unknown'
f=re.findall('<fanart>(.+?)</fanart>',link)
if f:
fan=f[0]
else:
fan=art+'/fanart2.jpg'
info=re.findall('<info><message>(.+?)</message><thumbnail>(.+?)</thumbnail></info>',link)
if info:
for msg,pic in info:
main.addLink(msg,'',pic)
popup=re.compile('<popup><name>([^<]+)</name.+?popImage>([^<]+)</popImage.+?thumbnail>([^<]+)</thumbnail></popup>').findall(link)
for name,image,thumb in popup:
main.addPlayc(name,image,244,thumb,'','','','','')
directory=re.compile('<dir><name>([^<]+)</name.+?link>([^<]+)</link.+?thumbnail>([^<]+)</thumbnail></dir>').findall(link)
for name,url,thumb in directory:
main.addDir(name,url,236,thumb)
match=re.compile('<title>([^<]+)</title.+?link>(.+?)</link.+?thumbnail>([^<]+)</thumbnail>').findall(link)
for name,url,thumb in sorted(match):
main.addPlayMs(name+' [COLOR blue]'+vip+'[/COLOR]',url,183,thumb,'',fan,'','','')
开发者ID:philtimmes,项目名称:addons,代码行数:26,代码来源:vipplaylist.py
示例8: ListglobalFavMs
def ListglobalFavMs():
from universal import favorites
fav = favorites.Favorites(addon_id, sys.argv)
fav_items = fav.get_my_favorites(section_title="Sports Favs", item_mode='addon')
if len(fav_items) > 0 :
for fav_item in fav_items:
if (fav_item['isfolder'] == 'false'):
main.addPlayMs(fav_item['title'],fav_item['infolabels'].get('item_url',''),
fav_item['infolabels'].get('item_mode',''), fav_item['image_url'],
fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
fav_item['infolabels'].get('year',''))
else:
main.addDirMs(fav_item['title'],fav_item['infolabels'].get('item_url',''),
fav_item['infolabels'].get('item_mode',''), fav_item['image_url'],
fav_item['infolabels'].get('plot',''), fav_item['fanart_url'],
fav_item['infolabels'].get('duration',''), fav_item['infolabels'].get('genre',''),
fav_item['infolabels'].get('year',''))
else:
xbmc.executebuiltin("XBMC.Notification([B][COLOR white]Sports-A-Holic[/COLOR][/B],[B]You Have No Saved Favourites[/B],5000,"")")
xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
开发者ID:philtimmes,项目名称:addons,代码行数:25,代码来源:default.py
示例9: ViceList
def ViceList(murl):
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','')
match=re.compile('''<a data-id=".+?" href="([^"]+)" onClick=".+?"><div class="media"><img src="(.+?)" alt="">.+?</p><h3>(.+?)</h3>''').findall(link)
for url,thumb,name in match:
url='http://www.vice.com'+url
main.addPlayMs(name,url,106,thumb,'','','','','')
开发者ID:alejusar,项目名称:starthere,代码行数:7,代码来源:vice.py
示例10: LIST
def LIST(mname,murl):
items=[]
i=0
if 'http' in murl:
text = main.OPENURL(murl)
else:
f = open(murl)
text = f.read()
name=re.findall('<title>([^<]+)</title>',text)
for names in name:
name=re.findall('<title>([^<]+)</title>',text)
url=re.findall('<link>([^<]+)</link>',text)
thumb=re.findall('<thumbnail>([^<]+)</thumbnail>',text)
if thumb:
thumb=thumb[i]
else:
thumb=''
items.append({
'title': name[i],
'thumbnail': thumb,
'path': url[i]
})
i=i+1
for channels in items:
main.addPlayMs(channels['title'],channels['path'],240,channels['thumbnail'],'','','','','')
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:25,代码来源:customchannel.py
示例11: ViceList
def ViceList(murl):
main.GA("Vice","Vice-list")
link=main.OPENURL(murl)
match=re.compile('<img src="(.+?)" alt="" width=".+?" height=".+?">\n <span class=".+?"></span>\n </a>\n <h2><a onClick=".+?" href="(.+?)">(.+?)</a></h2>').findall(link)
for thumb,url,name in match:
url='http://www.vice.com'+url
main.addPlayMs(name,url,106,thumb,'','','','','')
开发者ID:the-one-,项目名称:MashUp,代码行数:7,代码来源:vice.py
示例12: LISTNG2
def LISTNG2(murl):
MainUrl = "http://video.nationalgeographic.com"
link = main.OPENURL(murl)
match2 = re.compile("http://video.nationalgeographic.com/video/animals").findall(murl)
match3 = re.compile("http://video.nationalgeographic.com/video/kids").findall(murl)
match = re.compile('<a href="(.+?)" title="(.+?)"><img src="(.+?)"></a>').findall(link)
for url, name, thumb in match:
name = (
name.replace("'", "'")
.replace("<i>", "")
.replace("</i>", "")
.replace(""", '"')
.replace("&quot;", '"')
.replace("&", "&")
)
if (len(match2) == 0) and (len(match3) == 0):
main.addPlayMs(name, MainUrl + url, 74, MainUrl + thumb, "", "", "", "", "")
else:
main.addPlayMs(name, MainUrl + url, 75, MainUrl + thumb, "", "", "", "", "")
paginate = re.compile(
"""\n if ((.+?) === (.+?)) .+?\n .+?<li><a href="(.+?)">Next »</a></li>"""
).findall(link)
if len(paginate) > 0:
for pges, pg, pgtot, purl in paginate:
pg = pg.replace("(", "")
pgtot = pgtot.replace(")", "")
if pgtot != pg:
main.addDir("Page " + str(int(pg) + 1), MainUrl + purl + pg + "/", 73, art + "/next2.png")
main.GA("NG-Show", "List")
开发者ID:himag1,项目名称:MashUp,代码行数:29,代码来源:nationalgeo.py
示例13: MUSICLIST
def MUSICLIST(mname, murl):
link = main.OPENURL(murl, ua=useragent)
fan = re.findall('"banner":"(.+?)",', link, re.DOTALL)[0]
match = re.findall('{"id":".+?","link":"(.+?)","name":"(.+?)","year":"(.+?)","pic":"(.+?)"}', link, re.DOTALL)
dialogWait = xbmcgui.DialogProgress()
ret = dialogWait.create("Please wait until Song list is cached.")
totalLinks = len(match)
loadedLinks = 0
remaining_display = "Songs Cached :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
dialogWait.update(0, "[B]Will load instantly from now on[/B]", remaining_display)
xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
for url, name, year, thumb in match:
main.addPlayMs(
mname + " [COLOR red]" + name + " (" + year + ")[/COLOR]",
url,
279,
thumb.replace("\/", "/"),
"",
fan.replace("\/", "/"),
"",
"",
"",
)
loadedLinks = loadedLinks + 1
percent = (loadedLinks * 100) / totalLinks
remaining_display = "Songs Cached :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]."
dialogWait.update(percent, "[B]Will load instantly from now on[/B]", remaining_display)
if dialogWait.iscanceled():
break
main.GA("Mbox", "Music")
开发者ID:noba3,项目名称:KoTos,代码行数:30,代码来源:mbox.py
示例14: YOUList
def YOUList(mname,durl):
murl='http://gdata.youtube.com/feeds/api/users/'+durl+'/uploads?start-index=1&max-results=50'
link=main.OPENURL(murl)
match=re.compile("http\://www.youtube.com/watch\?v\=([^\&]+)\&.+?<media\:descriptio[^>]+>([^<]+)</media\:description>.+?<media\:thumbnail url='([^']+)'.+?<media:title type='plain'>(.+?)/media:title>").findall(link)
for url,desc,thumb,name in match:
name=name.replace('<','')
main.addPlayMs(name,url,48,thumb,desc,'','','','')
main.GA(mname,"Youtube-List")
开发者ID:rollysalvana,项目名称:pampereo-xbmc-plugins,代码行数:8,代码来源:youtube.py
示例15: LISTWT
def LISTWT(murl):
main.GA("Wildtv","Wildtv-list")
link=main.OPENURL(murl)
match=re.compile('alt="Video: (.+?)" href="(.+?)">\r\n<img class=".+?" src="(.+?)"').findall(link)
for name, url, thumb in match:
thumb='https:'+thumb
url='https://www.wildtv.ca/' +url
main.addPlayMs(name,url,94,thumb,'','','','','')
开发者ID:rollysalvana,项目名称:pampereo-xbmc-plugins,代码行数:8,代码来源:wildtv.py
示例16: YOUList
def YOUList(mname,durl):
murl='https://gdata.youtube.com/feeds/api/playlists/'+durl+'?start-index=1&max-results=50'
link=main.OPENURL(murl)
match=re.compile("href='https://m.youtube.com/details.?v=(.+?)'/.+?<media\:descriptio[^>]+>([^<]+)</media\:description>.+?<media\:thumbnail url='([^']+)'.+?<media:title type='plain'>(.+?)/media:title>").findall(link)
for url,desc,thumb,name in match:
name=name.replace('<','')
main.addPlayMs(name,url,206,thumb,desc,'','','','')
main.GA(mname,"Youtube-List")
开发者ID:rollysalvana,项目名称:pampereo-xbmc-plugins,代码行数:8,代码来源:youplaylist.py
示例17: LISTBF
def LISTBF(murl):
main.GA("FitnessBlender","List")
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('–','-')
main.addLink("[COLOR red]Body Focus [/COLOR]"+"[COLOR yellow]Calorie Burn [/COLOR]"+"[COLOR blue]Difficulty [/COLOR]"+"[COLOR green]Duration[/COLOR]",'','')
match=re.compile('<a class="teaser group" href="(.+?)"><div class=".+?<img id=".+?" class="fit_img.+?data-original="(.+?)" alt="([^"]+)".+?"><p>Calorie Burn:(.+?)</p><p>Minutes:(.+?)</p><p>Difficulty:(.+?)</p><p>Body Focus:(.+?)</p></div>').findall(link)
for url,thumb,name,cal,dur,diff,bf in match:
main.addPlayMs(name+" [COLOR red]"+bf+"[/COLOR]"+"[COLOR yellow]"+cal+"[/COLOR]"+"[COLOR blue]"+diff+"[/COLOR]"+"[COLOR green]"+dur+"[/COLOR]",'http://www.fitnessblender.com/'+url,203,thumb,'','','','','')
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:8,代码来源:fitnessblender.py
示例18: WATCHDOCList2
def WATCHDOCList2(murl):
#main.GA("WatchDocumentary","List")
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
match=re.compile('<a href="([^<]+)" title="([^<]+)"><img src="([^<]+)" alt=').findall(link)
for url,name,thumb in match: main.addPlayMs(name,url,161,thumb,'','','','','')
paginate=re.compile('<a href="([^<]+)">next »</a>').findall(link)
if (len(paginate)>0):
for purl in paginate: main.addDir('[COLOR blue]Next[/COLOR]','http://watchdocumentary.org/'+purl,163,art+'/next2.png')
开发者ID:alejusar,项目名称:starthere,代码行数:9,代码来源:watchdocumentary.py
示例19: TSNLIST
def TSNLIST(murl):
main.GA("TSN","TSN-list")
murl=murl+'&pageSize=200'
link=main.OPENURL(murl)
match = re.compile('<id>(.+?)</id>.+?<title><(.+?)></title><description><(.+?)></description><imgUrl>(.+?)</imgUrl>').findall(link)
for url,name,desc,thumb in match:
name=name.replace('![CDATA[','').replace(']]','').replace('/',' ')
desc=desc.replace('![CDATA[','').replace(']]','').replace('/',' ')
main.addPlayMs(name,url,98,thumb,desc,'','','','')
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:9,代码来源:tsn.py
示例20: FOXSOCList
def FOXSOCList(murl):
main.GA("FoxSoccer","List")
link=main.OPENURL(murl)
match=re.compile('<video xmlns=".+?">(.+?)</video>').findall(link)
for entry in match:
name=re.compile('<title>([^<]+)</title>').findall(entry)
desc=re.compile('<description>([^<]+)</description>').findall(entry)
thumb=re.compile('<file formatCode="2001".+?<uri>([^<]+)</uri></file>').findall(entry)
main.addPlayMs(name[0],entry,126,thumb[0],desc[0],'','','','')
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:9,代码来源:foxsoccer.py
注:本文中的resources.libs.main.addPlayMs函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论