本文整理汇总了Python中resources.libs.main.resolve_url函数的典型用法代码示例。如果您正苦于以下问题:Python resolve_url函数的具体用法?Python resolve_url怎么用?Python resolve_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resolve_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: LINK
def LINK(name,murl,thumb):
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
main.GA("Yify","Watched")
stream_url = False
ok=True
infoLabels =main.GETMETAT(name,'','',thumb)
video_type='movie'
season=''
episode=''
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
stream_url = main.resolve_url(murl)
try:
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
# play with bookmark
from resources.universal import playbackengine
if stream_url: main.CloseAllDialogs()
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory(addon_id)
wh.add_item(name+' '+'[COLOR green]Yify[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:31,代码来源:yify.py
示例2: LINKFX
def LINKFX(name,murl):
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
main.GA("FXCine","Watched")
stream_url = False
ok=True
infoLabels =main.GETMETAT(name,'','','')
video_type='movie'
season=''
episode=''
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
url=getlink(murl)
stream_url = main.resolve_url(url)
try:
listitem = xbmcgui.ListItem(thumbnailImage='')
listitem.setInfo('video', {'Title': name, 'Year': ''} )
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=season, episode=episode, year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(name+' '+'[COLOR green]FXCine[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img='', fanart='', is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:31,代码来源:fxcine.py
示例3: PLAYLINK
def PLAYLINK(mname,murl):
name=main.removeColoredText(mname)
murl = murl.lstrip('ice')
murl = eval(urllib.unquote(murl))
murl = resolveIceLink(murl)
main.GA("IceFilms","Watched")
ok=True
infoLabels =main.GETMETAT(mname,'','','')
video_type='movie'
season=''
episode=''
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
try:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(murl)
infoL={'Title': name, 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
from resources.universal import playbackengine
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=name,season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory('plugin.video.movie25')
wh.add_item(mname+' '+'[COLOR green]IceFilms[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:philtimmes,项目名称:addons,代码行数:33,代码来源:icefilms.py
示例4: PLAYMEDIA
def PLAYMEDIA(name,url):
ok = True
r = re.findall(r'(.+?)\[COLOR', name)
name = r[0]
r=re.findall('Season(.+?)Episode([^<]+)',name)
if r:
infoLabels =main.GETMETAEpiT(name,'','')
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
else:
infoLabels =main.GETMETAT(name,'','','')
video_type='movie'
season=''
episode=''
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
try:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(url)
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
from resources.universal import playbackengine
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory(addon_id)
wh.add_item(name+' '+'[COLOR=FF67cc33]TvRelease[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=str(img), fanart=str(fanart), is_folder=False)
player.KeepAlive()
return ok
except:
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:35,代码来源:tvrelease.py
示例5: LINK
def LINK(mname,murl,thumb,desc):
link=main.OPENURL(murl)
link=main.unescapes(link)
ok=True
try:
match=re.compile('src="http://www.youtube.com/embed/(.+?).?autoplay=1&cc_load_policy=0.+?"').findall(link)
if match:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)")
stream_url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+match[0]+"&hd=1"
match2=re.compile('src="http://player.vimeo.com/video/(.+?)"').findall(link)
if match2:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(str('http://vimeo.com/'+match2[0]))
if(stream_url == False):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)")
return
infoL={'Title': mname, 'Plot': desc}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(mname+' '+'[COLOR green]Doc-Wire[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
else:
xbmc.executebuiltin("XBMC.Notification(Sorry!,Link deleted Or unplayable,5000)")
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:30,代码来源:documentarywire.py
示例6: LINKSCINEM
def LINKSCINEM(mname,murl,thumb,desc):
main.GA("MailRu","Watched")
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
link=main.OPENURL(murl)
ok=True
match = re.compile('<iframe src="(.+?)"').findall(link)
if match:
stream_url = main.resolve_url(match[0])
try:
if stream_url == False: return
infoL={'Title': mname, 'Plot': desc, 'Genre': '', 'originaltitle': mname}
# play with bookmark
stream_url=stream_url.replace(' ','%20')
from resources.universal import playbackengine
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory(addon_id)
#wh.add_item(mname+' '+'[COLOR green]MAILRU[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
player.KeepAlive()
return True
except Exception, e:
if stream_url != False: main.ErrorReport(e)
return False
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:26,代码来源:cinemaxx.py
示例7: NovaWeed
def NovaWeed(murl):
link=main.OPENURL(murl)
link=main.unescapes(link)
vw = re.compile('flashvars.advURL="(.+?)";').findall(link)
vid_url=vw[0]
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
return main.resolve_url(vid_url)
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:7,代码来源:animefreak.py
示例8: LINKVD
def LINKVD(name,murl,thumb):
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
main.GA("Video Documentaire","Watched")
stream_url = False
ok=True
link=main.OPENURL(murl)
try:
match=re.compile('''<iframe.+?src="(.+?)".+?</iframe>''',re.DOTALL).findall(link)[0]
if 'http:' not in match:
match='http:'+match
stream_url = main.resolve_url(match.replace('?rel=0',''))
except:xbmc.executebuiltin("XBMC.Notification(Sorry!,Link Removed or Dead,3000)")
try:
listitem = xbmcgui.ListItem(thumbnailImage=thumb)
listitem.setInfo('video', {'Title': name, 'Year': ''} )
infoL={'Title': name, 'Plot': '', 'Genre': ''}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=name,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='')
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(name+' '+'[COLOR green]Video Documentaire[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infoL, img=thumb, fanart='', is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:29,代码来源:videodocumentaire.py
示例9: LINKMOO
def LINKMOO(mname,murl,thumb):
main.GA("Mooviemaniac","Watched")
ok=True
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,5000)")
infoLabels =main.GETMETAT(mname,'','','')
video_type='movie'
season=''
episode=''
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
try:
stream_url = main.resolve_url(murl)
if stream_url == False:
return
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
# play with bookmark
stream_url=stream_url.replace(' ','%20')
from resources.universal import playbackengine
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory('plugin.video.movie25')
wh.add_item(mname+' '+'[COLOR green]"Mooviemaniac"[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:philtimmes,项目名称:addons,代码行数:32,代码来源:mooviemaniac.py
示例10: LINKTV4B
def LINKTV4B(mname,murl):
main.GA("RlsmixTV","Watched")
ok=True
infoLabels =main.GETMETAEpiT(mname,'','')
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
try:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(murl)
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=infoLabels['title'],season=str(season), episode=(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(mname+' '+'[COLOR green]Rlsmix[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:kubakul,项目名称:MashUp,代码行数:27,代码来源:rlsmix.py
示例11: LINKFX
def LINKFX(name, murl):
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
main.GA("FXCine", "Watched")
stream_url = False
ok = True
infoLabels = main.GETMETAT(name, "", "", "")
video_type = "movie"
season = ""
episode = ""
img = infoLabels["cover_url"]
fanart = infoLabels["backdrop_url"]
imdb_id = infoLabels["imdb_id"]
infolabels = {
"supports_meta": "true",
"video_type": video_type,
"name": str(infoLabels["title"]),
"imdb_id": str(infoLabels["imdb_id"]),
"season": str(season),
"episode": str(episode),
"year": str(infoLabels["year"]),
}
url = getlink(murl)
stream_url = main.resolve_url(url)
try:
listitem = xbmcgui.ListItem(thumbnailImage="")
listitem.setInfo("video", {"Title": name, "Year": ""})
infoL = {"Title": infoLabels["title"], "Plot": infoLabels["plot"], "Genre": infoLabels["genre"]}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(
resolved_url=stream_url,
addon_id=addon_id,
video_type=video_type,
title=infoLabels["title"],
season=season,
episode=episode,
year=str(infoLabels["year"]),
img=img,
infolabels=infoL,
watchedCallbackwithParams=main.WatchedCallbackwithParams,
imdb_id=imdb_id,
)
# WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(
name + " " + "[COLOR green]FXCine[/COLOR]",
sys.argv[0] + sys.argv[2],
infolabels="",
img="",
fanart="",
is_folder=False,
)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:philtimmes,项目名称:addons,代码行数:58,代码来源:fxcine.py
示例12: VIDEOLINKSSG
def VIDEOLINKSSG(mname,murl,thumb):
#main.GA("SG","Watched")
msg = xbmcgui.DialogProgress()
msg.create('Please Wait!','')
msg.update(0,'Collecting hosts')
sources = []
ok=True
infoLabels =main.GETMETAEpiT(mname,thumb,'')
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
link=main.OPENURL(murl)
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','')
match=re.compile('href="([^"]+)"><img src=".+?" /><span class="link_name_tt">([^<]+)</span>').findall(link)
hostsmax = len(match)
h = 0
import urlresolver
for url, host in sorted(match):
host=host.replace('Visit ','')
h += 1
percent = (h * 100)/hostsmax
msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
if (msg.iscanceled()): break
hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
sources.append(hosted_media)
if (len(sources)==0):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
return
else:
source = urlresolver.choose_source(sources)
msg.close()
try:
if not source:
main.CloseAllDialogs()
return
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(source.get_url())
if stream_url == False: return
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
from resources.universal import playbackengine
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory('plugin.video.movie25')
wh.add_item(mname+' '+'[COLOR green]SeriesGate[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:alejusar,项目名称:starthere,代码行数:58,代码来源:seriesgate.py
示例13: PLAYOCW
def PLAYOCW(mname,murl):
sources=[]
main.GA("OneclickwatchT","Watched")
ok=True
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
playlist.clear()
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting Hosts,5000)")
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
match=re.compile('<p><a href=".+?" rel=".+?">(.+?)</a></p>').findall(link)
desc=re.compile('<.+? />Plot:(.+?)<.+? />').findall(link)
if len(desc)>0:
descs=desc[0]
else:
descs=''
thumb=re.compile('<img alt="" src="(.+?)"').findall(link)
if len(thumb)>0:
thumbs=thumb[0]
else:
thumbs=''
main.CloseAllDialogs()
import urlresolver
for url in match:
host=re.compile("http://(.+?).com/.+?").findall(url)
for hname in host:
host=hname.replace('www.','')
hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
sources.append(hosted_media)
if (len(sources)==0):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
else:
source = urlresolver.choose_source(sources)
try:
if source:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(source.get_url())
else:
stream_url = False
return
infoLabels =main.GETMETAEpiT(mname,thumbs,descs)
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(mname+' '+'[COLOR green]Oneclickwatch[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
player.KeepAlive()
return ok
except:
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:58,代码来源:oneclickwatch.py
示例14: LINKWATCHS
def LINKWATCHS(mname,murl):
main.GA("Watchseries","Watched")
ok=True
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
playlist.clear()
match=re.compile('(.+?)xocx(.+?)xocx').findall(murl)
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Checking Link,3000)")
for hurl, durl in match:
furl=geturl('http://watchseries.lt'+hurl)
link=main.OPENURL(durl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
match2=re.compile('<h1 class=".+?"><a href=".+?">.+?</a> - <a href="(.+?)" title=".+?">.+?</a>').findall(link)
for xurl in match2:
link2=main.OPENURL('http://watchseries.lt'+xurl)
link2=link2.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
descr=re.compile('<b>Description :</b>(.+?)<').findall(link2)
if len(descr)>0:
desc=descr[0]
else:
desc=''
thumbs=re.compile('<td style=".+?"><a href=".+?"><img src="(.+?)"').findall(link2)
if len(thumbs)>0:
thumb=thumbs[0]
else:
thumb=''
genres=re.compile('<b>Genre: <a href=.+?>(.+?)</a>').findall(link2)
if len(genres)>0:
genre=genres[0]
else:
genre=''
infoLabels =main.GETMETAEpiT(mname,thumb,desc)
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
try:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(furl)
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
from resources.universal import playbackengine
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory('plugin.video.movie25')
wh.add_item(mname+' '+'[COLOR green]WatchSeries[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:57,代码来源:watchseries.py
示例15: VIDEOLINKSEXTRA
def VIDEOLINKSEXTRA(mname,murl,thumb,desc):
main.GA("Extramina","Watched")
sources = []
link=main.OPENURL(murl)
ok=True
infoLabels =main.GETMETAT(mname,'','',thumb)
video_type='movie'
season=''
episode=''
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,5000)")
match=re.compile('<div class="streamlink"><a target=".+?" href="(.+?)">(.+?)</a></div>').findall(link)
for url, host in match:
match3=re.compile('extraminamovies').findall(url)
if len(match3)>0:
link2=main.OPENURL(url)
match = re.compile('<iframe src="(.+?)"').findall(link2)
if len(match)==0:
match = re.compile('src="(.+?)"').findall(link2)
for url in match:
match2=re.compile('http://(.+?)/.+?').findall(url)
for host in match2:
host = host.replace('www.','')
if host =='putlocker.com':
url=url.replace('embed','file')
hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
sources.append(hosted_media)
if (len(sources)==0):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
else:
source = urlresolver.choose_source(sources)
try:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(source.get_url())
if(stream_url == False):
return
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(mname+' '+'[COLOR green]Extramina[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart='', is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:53,代码来源:extramina.py
示例16: LINKFMA
def LINKFMA(mname,murl,thumb,desc):
main.GA("FMA","Watched")
sources = []
ok=True
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
playlist.clear()
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)")
infoLabels =main.GETMETAT(mname,'','',thumb)
video_type='movie'
season=''
episode=''
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
match=re.compile('<span class=\'.+?\'>(.+?)</span></p><div class=\'.+?\'><img src=\'.+?\' /></div><a class=\'.+?\' href="(.+?)"').findall(link)
import urlresolver
for host, url in match:
durl='http://www.freemoviesaddict.com/'+url
redirect=main.REDIRECT(durl)
hosted_media = urlresolver.HostedMediaFile(url=redirect, title=host)
sources.append(hosted_media)
if (len(sources)==0):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
else:
source = urlresolver.choose_source(sources)
if source != False:
try:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(source.get_url())
if(stream_url == False):
return
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
from resources.universal import playbackengine
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
from resources.universal import watchhistory
wh = watchhistory.WatchHistory(addon_id)
wh.add_item(mname+' '+'[COLOR green]FMA[/COLOR]', sys.argv[0]+sys.argv[2], infolabels=infolabels, img=img, fanart=fanart, is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:52,代码来源:fma.py
示例17: resolveMBLink
def resolveMBLink(url):
try:
r = re.findall('h=(\d+?)&u=(\d+?)&y=(\d+)',url,re.I)
if r: r = int(r[0][0]) + int(r[0][1]) + int(r[0][2])
else: r = 537 + int(re.findall('id=(\d+)',url,re.I)[0])
link=main.OPENURL(url,verbose=False)
q = re.findall('"lang":"en","apple":(\d+?),"google":(\d+?),"microsoft":"([^"]+?)"',link,re.I)
vklink = "https://vk.com/video_ext.php?oid="+str(r + int(q[0][0]))+"&id="+str(r + int(q[0][1]))+"&hash="+q[0][2]
except:
vklink=url
vklink=vklink.replace("\/",'/')
stream_url = main.resolve_url(vklink)
return stream_url
开发者ID:philtimmes,项目名称:addons,代码行数:13,代码来源:mbox.py
示例18: CHANNELCLink
def CHANNELCLink(mname,murl):
main.GA("CC/Tv4","Watched")
sources = []
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting hosts,3000)")
link=main.OPENURL(murl)
ok=True
playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
playlist.clear()
site = re.findall('channelcut',murl)
if len(site)>0:
match=re.compile('<a href="(.+?)" rel="nofollow">.+?</a><br/>').findall(link)
else:
match=re.compile('<td><a href="(.+?)" target="').findall(link)
for url in match:
match2=re.compile('http://(.+?)/.+?').findall(url)
for host in match2:
host = host.replace('www.','')
hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
sources.append(hosted_media)
if (len(sources)==0):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Show doesn't have playable links,5000)")
else:
source = urlresolver.choose_source(sources)
try:
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)")
stream_url = main.resolve_url(source.get_url())
if(stream_url == False):
return
infoLabels =main.GETMETAEpiT(mname,'','')
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
img=infoLabels['cover_url']
fanart =infoLabels['backdrop_url']
imdb_id=infoLabels['imdb_id']
infolabels = { 'supports_meta' : 'true', 'video_type':video_type, 'name':str(infoLabels['title']), 'imdb_id':str(infoLabels['imdb_id']), 'season':str(season), 'episode':str(episode), 'year':str(infoLabels['year']) }
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre']}
# play with bookmark
player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type=video_type, title=str(infoLabels['title']),season=str(season), episode=str(episode), year=str(infoLabels['year']),img=img,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id=imdb_id)
#WatchHistory
if selfAddon.getSetting("whistory") == "true":
wh.add_item(mname+' '+'[COLOR green]CC/Tv4[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=img, fanart='', is_folder=False)
player.KeepAlive()
return ok
except Exception, e:
if stream_url != False:
main.ErrorReport(e)
return ok
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:51,代码来源:backuptv.py
-
Python入门教程 Python 是一种解释型、面向对象、动态数据类型的高级程序设计语言。 P
阅读:13794|2022-01-22
-
Python wikiutil.getFrontPage函数代码示例
阅读:10180|2022-05-24
-
Python 简介 Python 是一个高层次的结合了解释性、编译性、互动性和面向对象的脚本
阅读:4078|2022-01-22
-
Python tests.group函数代码示例
阅读:4041|2022-05-27
-
Python util.check_if_user_has_permission函数代码示例
阅读:3840|2022-05-27
-
Python 练习实例98 Python 100例题目:从键盘输入一个字符串,将小写字母全部转换成大
阅读:3509|2022-01-22
-
Python 环境搭建 本章节我们将向大家介绍如何在本地搭建 Python 开发环境。 Py
阅读:3030|2022-01-22
-
Python output.darkgreen函数代码示例
阅读:2648|2022-05-25
-
Python 基础语法 Python 语言与 Perl,C 和 Java 等语言有许多相似之处。但是,也
阅读:2640|2022-01-22
-
Python 中文编码前面章节中我们已经学会了如何用 Python 输出 Hello, World!,英文没
阅读:2295|2022-01-22
|
请发表评论