本文整理汇总了Python中resources.libs.main.supportedHost函数的典型用法代码示例。如果您正苦于以下问题:Python supportedHost函数的具体用法?Python supportedHost怎么用?Python supportedHost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了supportedHost函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: LINKLISTSS
def LINKLISTSS(mname,url):
link=main.OPENURL(url)
link=link.replace('\r','').replace('\n','').replace('\t','')
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<p><!--baslik:.+?--><br /><IFRAME SRC="(.+?)"',re.I).findall(link)
if match:
host=re.compile("http://(.+?)/.+?").findall(match[0])
host=host[0].replace('www.','')
host=host.split('.')[0]
if main.supportedHost(host):
main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',match[0],327,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
match=re.compile('<a href="([^<]+)"><span>(.+?)</span></a>',re.DOTALL).findall(link)
for url,host in match:
if main.supportedHost(host):
main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,327,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:16,代码来源:sokrostream.py
示例2: LINKSP2
def LINKSP2(mname,url):
link=main.OPENURL(url)
link=main.unescapes(link)
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match0=re.compile('title="[^"]+?">([^"]+?)</a>.+?</p><ul>(.+?)</ul>').findall(link)
if not match0:
match0=re.compile('<h4>(.+?)</h4>(.+?)</ul>').findall(link)
if not match0:
match0=re.compile('<p><img src=".+?" alt="([^"]+?)" /></p>.+?<ul>(.+?)</ul>').findall(link)
for mname, links in reversed(match0):
match1=re.compile('<li><a href="([^"]+?)"[^>]*?><img [^>]*?alt="([^"]+?)"[^>]*?></a></li>').findall(links)
match= match1 + re.compile('<li><a href="([^"]+?)"[^>]*?>([^>]+?)</a></li>').findall(links)
filename = False
for murl, name in match:
fn = re.search('/([^/]+?\.(mkv|avi|mp4))(\.html)?$',murl)
if fn:
filename = fn.group(1)
break
for murl, name in match:
name = name[0].upper() + name[1:]
if main.supportedHost(name):
thumb=name.lower()
# if re.search('billionuploads',murl) and filename: murl += '#@#' + filename
main.addDown2(main.CleanTitle(mname)+' [COLOR blue]'+name+'[/COLOR]',murl,209,art+'/hosts/'+thumb+".png",art+'/hosts/'+thumb+".png")
开发者ID:charlesjackson261,项目名称:yolo-boo,代码行数:26,代码来源:newmyvideolinks.py
示例3: ListSceneLogLinks
def ListSceneLogLinks(mname,url):
html = main.OPENURL(url)
html = main.unescapes(html)
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
paragraphs = re.compile('<p>.*?</p>',re.I|re.DOTALL).findall(html)
itemsAdded = 0
from urlparse import urlparse
for paragraph in paragraphs:
links = re.compile('<a[\s]*?href="(.*?)"',re.I|re.DOTALL).findall(paragraph)
if len(links) == 1: # if more than 1 links per paragraph, its probably splitted file
for url in links:
if not re.search('rar',url,re.I):
host = urlparse(url).hostname.replace('www.','').partition('.')[0]
if main.supportedHost(host):
title = mname
quality = re.search('(?i)(720p|1080p|HDTV|PDTV|WEB DL|DVDRIP|WS DSR|DSR|BDRip|WEBRiP)',url,re.I)
if quality and not quality.group(1).lower() in mname.lower() :
title = re.sub('\[COLOR.*?\[/COLOR\]','',title).strip()
title += ' [COLOR red]'+quality.group(1).upper()+'[/COLOR]'
host = re.sub('^(https?://)?[^/]*?([^/^.]+?)\.\w+?/.*','\\2',url).upper()
thumb = host.lower()
main.addDown2(title+' [COLOR blue]'+host+'[/COLOR]',url,658,art+'/hosts/'+thumb+".png",art+'/hosts/'+thumb+".png")
itemsAdded += 1
if not itemsAdded:
xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
xbmc.executebuiltin("XBMC.Notification(Sorry,No sources found!,3000)")
开发者ID:charlesjackson261,项目名称:yolo-boo,代码行数:27,代码来源:scenelog.py
示例4: LINKLIST2
def LINKLIST2(mname,url):
if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('href="(.+?)" target="_blank">(.+?)</a>',re.DOTALL).findall(url)
for url,host in match:
if main.supportedHost(host):
mname=main.removeColoredText(mname)
main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,314,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:alejusar,项目名称:starthere,代码行数:7,代码来源:dpstreaming.py
示例5: LISTHOST
def LISTHOST(mname,murl,thumb):
epi = re.findall('\ss(\d+)e(\d+)\s',mname + " ",re.I)
for s,e in epi: pass
if e[0:1]=='0': epis=e[1:]
else: epis=e
CheckNextEpi= int(epis)+1
if(len(str(CheckNextEpi))==1): CheckNextEpi = "0" + str(CheckNextEpi)
CheckNextEpi ="S" + str(s) + "E" + str(CheckNextEpi)
CurrentEpi = re.search('(?i)(s\d+e\d+)',mname)
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','')
if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
if CheckNextEpi in link: links = re.search('<td class="mnllinklist" align="right"><div class="right">'+CurrentEpi.group(1)+'.+?</div>(.+?)<div class="right">'+CheckNextEpi+'.+?</div>', link)
else: links = re.search('<td class="mnllinklist" align="right"><div class="right">'+CurrentEpi.group(1)+'.+?</div>(.+?)<!-- End of the page footer -->', link)
if links:
links = links.group(1)
match=re.compile('''<a onclick='.+?href="([^"]+?)" target=".+?"><div>.+?</div><span>Loading Time: <span class='.+?'>([^<]+?)</span><br/>Host:(.+?)<br/>''', re.DOTALL).findall(links)
for url, loadtime, name in match:
domain=name
name=name.replace(' ','')
if name[0:1]=='.': name=name[1:]
name=name.split('.')[0]
if main.supportedHost(name.strip().lower()):
try:mediaID=url.split('?id=')[1]
except:mediaID=url.split('http://')[1].split('/')[1]
main.addDown2(mname+' [COLOR red](Loading Time: '+loadtime+')[/COLOR]'+' [COLOR blue]'+name.upper()+'[/COLOR]',name.lower().strip()+'x1x8x'+mediaID,462,art+'/hosts/'+name.lower()+'.png',art+'/hosts/'+name.lower()+'.png')
开发者ID:alejusar,项目名称:starthere,代码行数:26,代码来源:pftv.py
示例6: LINK2
def LINK2(name,url):
html = main.OPENURL(url)
html=html.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('IFRAME SRC','iframe src').replace("",'').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-')
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
r = re.compile(r'<b>([^"]*)</b></span><br /><iframe src="([^"]*)"',re.M|re.DOTALL).findall(html)
for host,url in r:
from urlparse import urlparse
host = urlparse(url).hostname.replace('www.','').partition('.')[0]
if main.supportedHost(host):
main.addDown2(name.strip()+" [COLOR blue]"+host.upper()+"[/COLOR]",url,2,art+'/hosts/'+host+'.png',art+'/hosts/'+host+'.png')
开发者ID:ArchUser,项目名称:Kasiks-Repo,代码行数:10,代码来源:couchtuner.py
示例7: LINKLIST
def LINKLIST(mname,url):
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile("""><img alt="([^<]+)" src="[^<]+" onClick="cargar.?'#player','(.+?)'""",re.DOTALL).findall(link)
for host,url in match:
host=host.replace(' Java','').replace('ShockShare','SockShare').replace('.to','')
print host
if main.supportedHost(host):
mname=main.removeColoredText(mname)
main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]','http://www.estrenosvk.com/player/'+url,310,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:alejusar,项目名称:starthere,代码行数:10,代码来源:fxcine.py
示例8: ListDirectDownloadTVLinks
def ListDirectDownloadTVLinks(mname,url):
ok=True
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('{"url":"([^"]+?)","hostname":"([^"]+?)"}').findall(url)
for url,host in match:
thumb=host.lower()
urlExceptions = re.compile('rar').findall(url)
# hostExceptions = re.compile('fileom|oteupload').findall(host)
# if not urlExceptions and not hostExceptions:
if not urlExceptions and main.supportedHost(host):
main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]',url,210,art+"/hosts/"+thumb+".png",art+"/hosts/"+thumb+".png")
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:12,代码来源:rlsmix.py
示例9: LINKLIST
def LINKLIST(mname,url):
link=main.OPENURL2(url)
link=link.replace('<iframe src="http://ads.affbuzzads.com','')
link=main.unescapes(link)
if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<iframe src="(.+?)" frameborder',re.DOTALL).findall(link)
for url in match:
hostn=re.compile("http://(.+?)/.+?").findall(url)
for hname in hostn:
host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
host=host.split('.')[0]
if main.supportedHost(host):
mname=main.removeColoredText(mname)
main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,314,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:alejusar,项目名称:starthere,代码行数:14,代码来源:dpstreaming.py
示例10: LISTEPISODE
def LISTEPISODE(mname,url):
link=main.OPENURL(url)
link=link.replace('\r','').replace('\n','').replace('\t','')
link=main.unescapes(link)
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<dd><a href="([^<]+)" class="zoombox.+?" title="([^<]+)">',re.DOTALL).findall(link)
for url,name in match:
hostn=re.compile("http://(.+?)/.+?").findall(url)
for hname in hostn:
host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
host=host.split('.')[0]
if main.supportedHost(host):
mname=main.removeColoredText(mname)
main.addDown2(name+' [COLOR blue]'+host.upper()+' [/COLOR]',url,797,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:15,代码来源:fullstream2.py
示例11: LINKLIST
def LINKLIST(mname,url):
link=main.OPENURL(url)
link=link.replace('\r','').replace('\n','').replace('\t','').replace('<iframe src="//www.facebook.com/plugins/likebox.php','').replace('<iframe src="http://creative.rev2pub.com','')
link=main.unescapes(link)
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<center><iframe.+?src="(.+?)".+?',re.DOTALL | re.IGNORECASE).findall(link)
#main.ErrorReport(match)
for url in match:
hostn=re.compile("http://(.+?)/.+?").findall(url)
for hname in hostn:
host=hname.replace('www.','').replace('embed.','').replace('.es','').replace('.in','').replace('.sx','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
host=host.split('.')[0]
if main.supportedHost(host):
mname=main.removeColoredText(mname)
main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]',url,797,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:16,代码来源:fullstream2.py
示例12: LINKLIST
def LINKLIST(mname,url):
link=main.OPENURL(url)
link=main.unescapes(link)
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<span class="(.+?)">.+?</span></td><td class="tdcalidad">(.+?)</td><td class=".+?<img src=".+?" alt="(.+?)" />.+?</td>.+?title=".+?" href="(.+?)">',re.DOTALL).findall(link)
for lang,qua,host,url in match:
if 'flag flag_0' in lang:
lang= ' [COLOR red]ESP[/COLOR]'
if 'flag flag_1' in lang:
lang= ' [COLOR yellow]LAT[/COLOR]'
if 'flag flag_2' in lang:
lang= ' [COLOR purple]ENG[/COLOR]'
if 'flag flag_3' in lang:
lang= ' [COLOR green]SUB[/COLOR]'
if main.supportedHost(host):
mname=main.removeColoredText(mname)
main.addDown2(mname+' [COLOR blue]'+host.upper()+' [/COLOR]'+ lang+' [COLOR aqua]'+qua+'[/COLOR]',url,67,art+'/hosts/'+host.lower()+".png",art+'/hosts/'+host.lower()+".png")
开发者ID:marduk191,项目名称:plugin.video.movie25,代码行数:18,代码来源:cinevip.py
示例13: LINKLIST
def LINKLIST(mname, url):
link = main.OPENURL(url)
link = main.unescapes(link)
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", "", "")
match = re.compile("""><img alt="([^<]+)" src="[^<]+" onClick="cargar.?'#player','(.+?)'""", re.DOTALL).findall(
link
)
for host, url in match:
host = host.replace(" Java", "").replace("ShockShare", "SockShare").replace(".to", "")
print host
if main.supportedHost(host):
mname = main.removeColoredText(mname)
main.addDown2(
mname + " [COLOR blue]" + host.upper() + "[/COLOR]",
"http://www.fxcine.com/player/" + url,
310,
art + "/hosts/" + host.lower() + ".png",
art + "/hosts/" + host.lower() + ".png",
)
开发者ID:philtimmes,项目名称:addons,代码行数:20,代码来源:fxcine.py
示例14: ListDirectDownloadTVLinks
def ListDirectDownloadTVLinks(mname,url):
ok=True
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('{"url":"([^"]+?)","hostname":"([^"]+?)"}').findall(url)
prev = ''
archived = ''
for url,host in match:
if (host == prev and not host in archived ):
archived += host
prev = host
h = 0
for url,host in match:
thumb=host.lower()
urlExceptions = re.compile('rar').findall(url)
if not (urlExceptions or host in archived) and main.supportedHost(host):
h += 1
main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]',url,210,art+"/hosts/"+thumb+".png",art+"/hosts/"+thumb+".png")
if not h:
xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
xbmc.executebuiltin("XBMC.Notification(Sorry,No Playable Links Found,2000)")
开发者ID:Ladeiras,项目名称:AutoUpdate,代码行数:21,代码来源:rlsmix.py
示例15: LISTHOSTERS
def LISTHOSTERS(name,url):
html = GETHTML(url)
if html == None: return
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
r = re.findall(r'class="td_cols"><a target=\'_blank\'.+?href=\'(.+?)\'>',html, re.M|re.DOTALL)
try:
t = re.findall(r'rel="nofollow">((?!.*\.rar).*)</a>', html, re.I)
r = r+t
except: pass
if len(r) == 0:
addon.show_ok_dialog(['No Playable Streams Found,','It Might Be That They Are Still Being Uploaded,',
'Or They Are Unstreamable Archive Files'],'MashUP: TV-Release')
xbmcplugin.endOfDirectory(int(sys.argv[1]), False, False)
return
from urlparse import urlparse
for url in r:
url = url.replace("180upload.nl","180upload.com")
host = urlparse(url).hostname.replace('www.','').partition('.')[0]
if main.supportedHost(host):
main.addDown2(name.strip()+" [COLOR blue]"+host.upper()+"[/COLOR]",url,1005,art+'/hosts/'+host+'.png',art+'/hosts/'+host+'.png')
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:21,代码来源:tvrelease.py
示例16: iWatchLINK
def iWatchLINK(mname,url):
link=main.OPENURL(url)
movie_content = main.unescapes(link)
movie_content = re.sub("\\\"", "\"", movie_content)
movie_content=movie_content.replace('\'','')
from resources.universal import _common as univ_common
link2 = univ_common.str_conv(decode(movie_content))
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
links = re.search('<tbody>(.+?)</tbody>', link2)
if links:
links = links.group(1).replace(' ','')
#print links href="([^"]+?)" target="_blank" rel="nofollow"><img src=".+?>([^<]+?)</td><td><img src=".+?</td><td>.+?</td><td>([^<]+?)</td>
match=re.compile('href="([^"]+?)" target="_blank" rel="nofollow"><img src=".+?>([^<]+?)</td><td><img src=".+?</td><td>.+?</td><td>([^<]+?)</td>', re.DOTALL).findall(links)
for url, name, qua in match:
name=name.replace(' ','')
if name[0:1]=='.':
name=name[1:]
name=name.split('.')[0]
if main.supportedHost(name.lower()):
main.addDown2(mname+' [COLOR red]('+qua+')[/COLOR]'+' [COLOR blue]'+name.upper()+'[/COLOR]',url,649,art+'/hosts/'+name.lower()+'.png',art+'/hosts/'+name.lower()+'.png')
开发者ID:charlesjackson261,项目名称:yolo-boo,代码行数:22,代码来源:iwatchonline.py
示例17: LINKSP3
def LINKSP3(mname,murl):
main.GA("FilesTube","Watched")
msg = xbmcgui.DialogProgress()
msg.create('Please Wait!','')
msg.update(0,'Collecting hosts')
link=main.OPENURL(murl,mobile=True,timeout = 10)
sources=[]
titles=[]
ok=True
match=re.compile('(?sim)<pre id="copy_paste_links"[^<]+?</pre>').findall(link)
if match:
match = re.compile('(https?://[^<]+)').findall(match[0])
hostsmax = len(match)
h = 0
from urlparse import urlparse
for url in match:
url = url.strip()
h += 1
percent = (h * 100)/hostsmax
msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
if msg.iscanceled(): break
vlink=re.compile('rar|part\d+?(\.html)?$|/folder/').findall(url)
if len(vlink)==0:
host = urlparse(url).hostname.replace('www.','').partition('.')[0]
hostname = host
host = host.upper()
quality = mname
match3=re.compile('(?i)(720p?|1080p?)').findall(quality)
if match3 and not 'p' in match3[0]: match3[0] += 'p'
match4=re.compile('mp4').findall(url)
if len(match3)>0:
host =host+' [COLOR red]'+match3[0]+'[/COLOR]'
elif len(match4)>0:
host =host+' [COLOR green]SD MP4[/COLOR]'
else:
host =host+' [COLOR blue]SD[/COLOR]'
if main.supportedHost(hostname):
titles.append(host)
sources.append(url)
msg.close()
if (len(sources)==0):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Could not find a playable link,3000)")
return
else:
dialog = xbmcgui.Dialog()
index = dialog.select('Choose your stream', titles)
if index != -1:
source = sources[index]
else: source = None
try:
if not source:
main.CloseAllDialogs()
return
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
stream_url = main.resolve_url(source)
if(stream_url == False):
return
if re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I):
mname=mname.split('&')[0]
infoLabels =main.GETMETAEpiT(mname,'','')
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
else:
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']) }
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName'])
# 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]DL4Free[/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:marduk191,项目名称:plugin.video.movie25,代码行数:90,代码来源:filestube.py
示例18: LISTHOST
def LISTHOST(mname, murl, thumb):
epi = re.findall("\ss(\d+)e(\d+)\s", mname + " ", re.I)
for s, e in epi:
pass
if e[0:1] == "0":
epis = e[1:]
else:
epis = e
CheckNextEpi = int(epis) + 1
if len(str(CheckNextEpi)) == 1:
CheckNextEpi = "0" + str(CheckNextEpi)
CheckNextEpi = "S" + str(s) + "E" + str(CheckNextEpi)
CurrentEpi = re.search("(?i)(s\d+e\d+)", mname)
link = main.OPENURL(murl)
link = link.replace("\r", "").replace("\n", "").replace("\t", "")
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", "", "")
if CheckNextEpi in link:
links = re.search(
'<td class="mnllinklist" align="right"><div class="right">'
+ CurrentEpi.group(1)
+ '.+?</div>(.+?)<div class="right">'
+ CheckNextEpi
+ ".+?</div>",
link,
)
else:
links = re.search(
'<td class="mnllinklist" align="right"><div class="right">'
+ CurrentEpi.group(1)
+ ".+?</div>(.+?)<!-- End of the page footer -->",
link,
)
if links:
links = links.group(1)
match = re.compile(
"""<a onclick='.+?href="([^"]+?)" target=".+?"><div>.+?</div><span>Loading Time: <span class='.+?'>([^<]+?)</span><br/>Host:(.+?)<br/>""",
re.DOTALL,
).findall(links)
for url, loadtime, name in match:
domain = name
name = name.replace(" ", "")
if name[0:1] == ".":
name = name[1:]
name = name.split(".")[0]
if main.supportedHost(name.strip().lower()):
try:
mediaID = url.split("?id=")[1]
except:
mediaID = url.split("http://")[1].split("/")[1]
main.addDown2(
mname
+ " [COLOR red](Loading Time: "
+ loadtime
+ ")[/COLOR]"
+ " [COLOR blue]"
+ name.upper()
+ "[/COLOR]",
name.lower().strip() + "x1x8x" + mediaID,
462,
art + "/hosts/" + name.lower() + ".png",
art + "/hosts/" + name.lower() + ".png",
)
开发者ID:noba3,项目名称:KoTos,代码行数:63,代码来源:pftv.py
示例19: LINKSP3
def LINKSP3(mname,murl):
main.GA("Rls1Click","Watched")
msg = xbmcgui.DialogProgress()
msg.create('Please Wait!','')
msg.update(0,'Collecting hosts')
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('&','&')
sources=[]
titles=[]
urls=[]
ok=True
paragraphs=re.compile('(?sim)<strong>1-Click</strong>.*?<strong>1GB Links</strong>').findall(link)
for paragraph in paragraphs:
urls = re.compile('href="(https?://[^<^\]^"]+)"').findall(paragraph)
# match=re.compile('<a href="([^<]+)">htt').findall(link)
# match = match1 + match
print urls
hostsmax = len(urls)
h = 0
from urlparse import urlparse
for url in urls:
h += 1
percent = (h * 100)/hostsmax
msg.update(percent,'Collecting hosts - ' + str(percent) + '%')
if msg.iscanceled(): break
if '1fichier' in url:
host = '1fichier'
else:
host = urlparse(url).hostname.replace('www.','').partition('.')[0]
hostname = host
host = host.upper()
if main.supportedHost(hostname):
titles.append(host + ' [COLOR red]1080P[/COLOR]')
sources.append(url)
msg.close()
if (len(sources)==0):
xbmc.executebuiltin("XBMC.Notification(Sorry!,Could not find a playable link,3000)")
return
else:
dialog = xbmcgui.Dialog()
index = dialog.select('Choose your stream', titles)
if index != -1:
source = sources[index]
else: source = None
try:
if not source:
main.CloseAllDialogs()
return
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,5000)")
stream_url = main.resolve_url(source)
if(stream_url == False):
return
if re.findall('(.+?)\ss(\d+)e(\d+)\s',mname,re.I):
mname=mname.split('&')[0]
infoLabels =main.GETMETAEpiT(mname,'','')
video_type='episode'
season=infoLabels['season']
episode=infoLabels['episode']
else:
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']) }
infoL={'Title': infoLabels['title'], 'Plot': infoLabels['plot'], 'Genre': infoLabels['genre'], 'originaltitle': infoLabels['metaName']}
if not video_type is 'episode': infoL['originalTitle']=main.removeColoredText(infoLabels['metaName'])
# 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]DL4Free[/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:Ladeiras,项目名称:AutoUpdate,代码行数:85,代码来源:rls1click.py
示例20: LISTSP3
def LISTSP3(murl):
subpages = 5
if murl == 'HD':
page = 1
max = 100
else:
try:
pages = murl.split(',', 1 );
page = int(pages[0])
max = int(pages[1])
except:
page = 1
# http://www.filestube.com/query.html?q=1080p+bluray+-esubs+-msubs+-subs&hosting=85&select=mkv&sizefrom=6000&sizeto=20000&sort=dd&page=1
hosts = ""
possiblehosts = (
["lumfile.com","85"],
["turbobit.net","40"],
# ["fileom.com","106"],
# ["letitbit.net","25"],
)
for h,n in possiblehosts:
if main.supportedHost(h): hosts += n+"%2C"
hosts = hosts.rstrip("%2C")
url='http://www.filestube.com/query.html?q=1080p+bluray+-esubs&hosting='+hosts+'&select=mkv&sizefrom=5000&sizeto=20000&sort=dd'
urls = []
for n in range(subpages):
urls.append(url+"&page="+str(page+n))
if page+n == max: break
page = page + subpages - 1
link=main.batchOPENURL(urls)
# print link
next = len(re.compile('>►</a>').findall(link)) == subpages
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('&','&')
match=re.compile('(?sim)<a href="([^"]+?)"[^>]*?class="rL"[^>]*?>(.+?)</a>.*?class="eT.*?<b>([^>]*?)<').findall(link)
dialogWait = xbmcgui.DialogProgress()
ret = dialogWait.create('Please wait until Movie list is cached.')
match1 = []
for url, name, hostsite in match:
name = name.replace('<b>','').replace('</b>','')
name=main.unescapes(name)
if not re.search('(?i)(\\bsubs\\b|\\msubs\\b|fetish)',name) and re.search('(?i)(20\d\d|19\d\d)',name):
match1.append((url,name,hostsite))
match = match1
totalLinks = len(match)
loadedLinks = 0
remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
for url, name, hostsite in match:
url = url.decode('utf-8').encode('ascii', 'ignore')
url = 'http://www.filestube.com' + url
main.addPlayM(main.CleanTitle(name.strip()) + " [COLOR red]" + hostsite + "[/COLOR]",url,406,'','','','','','')
loadedLinks = loadedLinks + 1
percent = (loadedLinks * 100)/totalLinks
remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
if dialogWait.iscanceled(): break
if next and loadedLinks >= totalLinks:
main.addDir('Page ' + str(page/subpages) + ' [COLOR blue]Next Page >>>[/COLOR]',str(page+1)+','+str(max),405,art+'/next2.png')
dialogWait.close()
del dialogWait
#main.GA("HD-TV","FilesTube")
main.VIEWS()
开发者ID:alejusar,项目名称:starthere,代码行数:62,代码来源:filestube.py
注:本文中的resources.libs.main.supportedHost函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论