本文整理汇总了Python中resources.libs.main.addDown2函数的典型用法代码示例。如果您正苦于以下问题:Python addDown2函数的具体用法?Python addDown2怎么用?Python addDown2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addDown2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: 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','')
main.addDown2(mname+' [COLOR blue]'+host.upper()+'[/COLOR]',url,237,art+'/hosts/'+host.lower()+'.png',art+'/hosts/'+host.lower()+'.png')
示例2: LINKTV4
def LINKTV4(mname,url):
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting Hosts,3000)")
link=main.OPENURL(url)
link= link.replace('TV Rage','').replace('Homepage','').replace('href="http://www.tvrage.com','').replace('href="http://www.cbs.com','').replace('Torrent Search','').replace('Season Download','').replace('href="http://uppix.net','').replace('href="http://www.torrentz.com','').replace('href="http://directdownload.tv','')
ok=True
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<a href="(.+?)" target="_blank">(.+?)</a>').findall(link)
print len(match)
for url, host in match:
thumb=host.lower()
match5=re.compile('Part').findall(host)
if len(match5)>0:
match6=re.compile('http://(.+?)/.+?').findall(url)
for url2 in match6:
host2 = url2.replace('www.','').replace('.in','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','')
thumb=host2.lower()
match3=re.compile('720p').findall(url)
match4=re.compile('mp4').findall(url)
if len(match3)>0:
host =host+' [COLOR red]HD[/COLOR]'
elif len(match4)>0:
host =host+' [COLOR green]SD MP4[/COLOR]'
else:
host =host+' [COLOR blue]SD[/COLOR]'
match2=re.compile('rar').findall(url)
if len(match2)==0:
hosted_media = urlresolver.HostedMediaFile(url=url, title=host)
match2=re.compile("{'url': '(.+?)', 'host': '(.+?)', 'media_id': '.+?'}").findall(str(hosted_media))
for murl,name in match2:
main.addDown2(mname+' [COLOR blue]'+host+'[/COLOR]',murl,210,art+thumb+".png",art+thumb+".png")
示例3: LISTHOSTERS
def LISTHOSTERS(name,url):
html = GETHTML(url)
if html == None: return
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')
return
sources = []
for url in r:
media = urlresolver.HostedMediaFile(url=url)
sources.append(media)
sources = urlresolver.filter_source_list(sources)
r = re.findall(r'\'url\': \'(.+?)\', \'host\': \'(.+?)\'', str(sources), re.M)
for url, host in r:
r = re.findall(r'(.+?)\.',host)
if 'www.real-debrid.com' in host:
host = re.findall(r'//(.+?)/', url)
host = host[0].replace('www.','')
host = host.rpartition('.')
host = host[0]
else:
host = r[0]
main.addDown2(name+"[COLOR blue] :"+host.upper()+"[/COLOR]",url,1005,art+'/hosts/'+host+'.png',art+'/hosts/'+host+'.png')
示例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")
示例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')
示例6: 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)")
示例7: 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")
示例8: resolveURL
def resolveURL(name,url):
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
html = main.OPENURL(url)
html = main.unescapes(html).replace('IFRAME SRC','iframe src')
match = re.findall('<iframe.+?src="([^"]*?)"',html)
for url in match:
main.addDown2(name.strip(),str(url),2,'.png','.png')
示例9: LINKSP4
def LINKSP4(mname,murl):
html = main.OPENURL(murl)
html = html.replace('href="http://oneclickmoviez.com/dws/MEGA','')
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('<a rel="nofollow" href="([^"]+?)"[^>]*?>([^<]+?)</a>\s*?\(Single\)<',re.DOTALL).findall(html)
if match:
urls = []
exlude = "(BAYFILES|RYUSHARE)"
for url, host in match:
if not re.search(exlude,host):
urls.append(url)
if urls:
contents = main.batchOPENURL(urls, merge=False)
i = 0
for url, host in match:
if not re.search('(?i)'+exlude,host):
thumb = host.lower()
thumb = thumb.replace('www.','').replace('.in','').replace('.net','').replace('.com','').replace('.to','').replace('.org','').replace('.ch','')
vlink = getlink(contents[i])
i += 1
archive = re.compile('rar').findall(vlink)
if not archive:
import urlresolver
hosted_media = urlresolver.HostedMediaFile(url=vlink, title=host)
match2=re.compile("{'url': '(.+?)', 'host': '(.+?)', 'media_id': '.+?'}").findall(str(hosted_media))
for murl,name in match2:
main.addDown2(mname+' [COLOR blue]'+host+'[/COLOR]',murl,211,art+'/hosts/'+thumb+".png",art+'/hosts/'+thumb+".png")
示例10: LINKZ
def LINKZ(name,url):
main.addLink("[COLOR orange]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
link=main.OPENURL(url)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('IFRAME SRC','iframe src')
match=re.compile('<b>([^"]*?)</b></span><br /><iframe.+?src="([^"]*?)"').findall(link)
for host,url in match:
host=host.replace('AllMyV','allmyvideos').replace('VSpot','vidspot').replace('TheVid','thevideo').replace('Vodlo','vodlocker').replace('Vidbul','vidbull').replace('IShar','ishared').replace('allmyvideosid','allmyvideos')
host=host.replace('FHoot','filehoot').replace('VidtO','vidto').replace('VK-Mob','vk')
main.addDown2(name.strip()+" [COLOR blue]"+host.upper()+"[/COLOR]",str(url),2,art+'/hosts/'+host+'.png',art+'/hosts/'+host+'.png')
示例11: 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")
示例12: 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')
示例13: 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")
示例14: iWatchLINK
def iWatchLINK(mname,url):
xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting Hosts,1500)")
link=main.OPENURL(url)
link=main.unescapes(link)
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<td class="sideleft"><a href="([^<]+)" target=".+?" rel=".+?"><img src=".+?" alt="" />(.+?)</a>').findall(link)
for url, name in match:
name=name.replace(' ','')
if name[0:1]=='.':
name=name[1:]
name=name.split('.')[0]
main.addDown2(mname+' [COLOR red]'+name.upper()+'[/COLOR]',url,649,art+'/hosts/'+name.lower()+'.png',art+'/hosts/'+name.lower()+'.png')
示例15: LINKSP2
def LINKSP2(mname,url):
link=main.OPENURL(url)
link=main.unescapes(link)
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','')
match=re.compile('<li><a href="h(.+?)">(.+?)</a></li>').findall(link)
for murl, name in match:
thumb=name.lower()
murl='h'+murl
hosted_media = urlresolver.HostedMediaFile(url=murl, title=name)
match2=re.compile("{'url': '(.+?)', 'host': '(.+?)', 'media_id': '.+?'}").findall(str(hosted_media))
for murl,host in match2:
main.addDown2(mname+' [COLOR blue]'+name+'[/COLOR]',murl,209,art+'/hosts/'+thumb+".png",art+'/hosts/'+thumb+".png")