def LISTSTREAMS(mname,murl):
mname=main.removeColoredText(mname)
id= re.search('(\d{4})(\d{2})(\d{4})',murl)
xml='http://smb.cdnak.neulion.com/fs/nhl/mobile/feed_new/data/streams/'+str(id.group(1))+'/ipad/'+str(id.group(2))+'_'+str(id.group(3))+'.json'
link=main.OPENURL(xml)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','')
match=re.compile('"vod-condensed":{"bitrate0":"([^"]+)"},"vod-continuous":{"bitrate0":"([^"]+)","image":"([^"]+)"},"vod-whole":{"bitrate0":"([^"]+)"}',re.DOTALL).findall(link)
for cond,cont,thumb,whole in match:
if '_h_condensed' in cond:
main.addPlayc(mname+' [COLOR blue]Home Condensed[/COLOR]',cond,396,thumb,'','','','','')
else:
main.addPlayc(mname+' [COLOR blue]Away Condensed[/COLOR]',cond,396,thumb,'','','','','')
if '_h_continuous' in cont:
main.addPlayc(mname+' [COLOR blue]Home Continuous[/COLOR]',cont,396,thumb,'','','','','')
else:
main.addPlayc(mname+' [COLOR blue]Away Continuous[/COLOR]',cont,396,thumb,'','','','','')
if '_h_whole' in whole:
main.addPlayc(mname+' [COLOR blue]Home Whole[/COLOR]',whole,396,thumb,'','','','','')
else:
main.addPlayc(mname+' [COLOR blue]Away Whole[/COLOR]',whole,396,thumb,'','','','','')
match2=re.compile('"away".+?"live":{"bitrate0":"([^"]+)"},.+?"image":"([^"]+)"',re.DOTALL).findall(link)
for live,thumb in match2:
main.addPlayc(mname+' [COLOR blue]Away Live[/COLOR]',live+'x0xe'+str(murl),396,thumb,'','','','','')
match3=re.compile('"home".+?"live":{"bitrate0":"([^"]+)"},.+?"image":"([^"]+)"',re.DOTALL).findall(link)
for live,thumb in match3:
main.addPlayc(mname+' [COLOR blue]Home LIVE[/COLOR]',live+'x0xe'+str(murl),396,thumb,'','','','','')
开发者ID:alejusar,项目名称:starthere,代码行数:26,代码来源:nhl.py
示例5: 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")
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")
def LISTHOSTS(name,murl,thumb):
name=main.removeColoredText(name)
videobug=[]
yourupload=[]
video44=[]
i=1
j=1
v=1
if 'GetDetails' in murl:
link=main.OPENURL(murl)
idnum=re.findall('"id":"(.+?)"',link,re.DOTALL)[0]
else:
idnum=murl
link=main.OPENURL('http://api.dramago.com/GetVideos/'+idnum).replace('\/','/')
collect=re.findall('"(.+?)"',link,re.DOTALL)
for links in collect:
if 'videobug' in links:
link=main.OPENURL(links)
try:match=re.compile("playlist:.+?url: '(.+?)',",re.DOTALL).findall(link)[0]
except:match=re.compile('file: "(.+?)",',re.DOTALL).findall(link)[0]
match=urllib.unquote_plus(match)
main.addDown2(name+' [COLOR blue]VideoBug Part '+str(i)+'[/COLOR]',match,272,thumb,'')
videobug.append(('Part '+str(i),match))
i=i+1
if videobug:
main.addDown2(name+' [COLOR blue]VideoBug Play All[/COLOR]',str(videobug),272,thumb,'')
for links in collect:
if 'yourupload' in links:
link=main.OPENURL(links)
try:
match=re.compile('<meta property="og.+?video" content="(.+?)"/>',re.DOTALL).findall(link)
if len(match)!=0:
match=urllib.unquote_plus(match[0])
main.addDown2(name+' [COLOR yellow]YourUpload Part '+str(j)+'[/COLOR]',match,272,thumb,'')
yourupload.append(('Part '+str(j),match))
j=j+1
except:pass
if yourupload and len(match)!=0:
main.addDown2(name+' [COLOR yellow]YourUpload Play All[/COLOR]',str(videobug),272,thumb,'')
for links in collect:
if 'video44' in links:
link=main.OPENURL(links)
try:match=re.compile("playlist:.+?url: '(.+?)',",re.DOTALL).findall(link)[0]
except:match=re.compile('file: "(.+?)"',re.DOTALL).findall(link)[0]
match=urllib.unquote_plus(match)
main.addDown2(name+' [COLOR red]Video44 Part '+str(v)+'[/COLOR]',match,272,thumb,'')
video44.append(('Part '+str(v),match))
v=v+1
if video44:
main.addDown2(name+' [COLOR red]Video44 Play All[/COLOR]',str(videobug),272,thumb,'')
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")
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")
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")
def LINK(mname,murl):
if BASE_URL not in murl:
murl=BASE_URL+murl
html = main.OPENURL(murl)
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
r = re.compile(r'class="(o.+?)">.+?javascript:show\(\'(.+?)\'\,\'.+?\'\,\s\'(.+?)\'\)\;.+?<b>(.+?)said work',re.M|re.DOTALL).findall(html)
for status, url, hoster, said in r:
percentage = said.replace('%','')
host=hoster
hoster = hoster.replace('www.','').replace('.in','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','').replace('.eu','').replace('.ES','')
if int(percentage) in range(0,25):
title = '[COLOR blue]'+hoster.upper()+'[/COLOR][COLOR red] '+status+' '+said+'[/COLOR]'
if int(percentage) in range(25,50):
title = '[COLOR blue]'+hoster.upper()+' '+status+' '+said+'[/COLOR]'
if int(percentage) in range(50,75):
title = '[COLOR blue]'+hoster.upper()+'[/COLOR][COLOR orange] '+status+' '+said+'[/COLOR]'
if int(percentage) in range(75,101):
title = '[COLOR blue]'+hoster.upper()+'[/COLOR][COLOR=FF67cc33] '+status+' '+said+'[/COLOR]'
main.addDown2(main.removeColoredText(mname).strip()+' '+title,'xoxv'+host+'xoxe'+url+'xoxc',1027,art+'/hosts/'+hoster.lower()+'.png',art+'/hosts/'+hoster.lower()+'.png')
请发表评论