本文整理汇总了Python中resources.libs.main.addLink函数的典型用法代码示例。如果您正苦于以下问题:Python addLink函数的具体用法?Python addLink怎么用?Python addLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addLink函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: 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
示例2: 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')
开发者ID:markheggan,项目名称:Kasiks-Repo,代码行数:7,代码来源:couchtuner.py
示例3: 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")
开发者ID:marduk191,项目名称:plugin.video.movie25,代码行数:28,代码来源:oneclickmoviez.py
示例4: LINKSP
def LINKSP(name,url):
link=main.OPENURL(url)
putlocker=re.compile('<a href="(.+?)">putlocker.com</a><br />').findall(link)
for url in putlocker:
match=re.compile('http://pastebin.com/.+?').findall(url)
if (len(match) > 0):
link=main.OPENURL(url)
main.addLink('If list is empty,means the links are downloadable only','','')
else:
main.addPlayb(name,url,134,"%s/art/put.png"%selfAddon.getAddonInfo("path"),"%s/art/put.png"%selfAddon.getAddonInfo("path"))
flashx=re.compile('<a href="(.+?)">flashx.tv</a><br />').findall(link)
for url in flashx:
main.addPlayb(name,url,134,"%s/art/flash.png"%selfAddon.getAddonInfo("path"),"%s/art/flash.png"%selfAddon.getAddonInfo("path"))
nowvideo=re.compile('<a href="(.+?)">nowvideo.eu</a><br />').findall(link)
for url in nowvideo:
main.addPlayb(name,url,134,"%s/art/nov.png"%selfAddon.getAddonInfo("path"),"%s/art/nov.png"%selfAddon.getAddonInfo("path"))
uploadc=re.compile('<a href="(.+?)">uploadc.com</a><br />').findall(link)
for url in uploadc:
main.addPlayb(name,url,134,"%s/art/uc.png"%selfAddon.getAddonInfo("path"),"%s/art/uc.png"%selfAddon.getAddonInfo("path"))
vidxden=re.compile('<a href="(.+?)">vidxden.com</a><br />').findall(link)
for url in vidxden:
main.addPlayb(name,url,134,"%s/art/vidx.png"%selfAddon.getAddonInfo("path"),"%s/art/vidx.png"%selfAddon.getAddonInfo("path"))
vidbux=re.compile('<a href="(.+?)">vidbux.com</a><br />').findall(link)
for url in vidbux:
main.addPlayb(name,url,134,"%s/art/vidb.png"%selfAddon.getAddonInfo("path"),"%s/art/vidb.png"%selfAddon.getAddonInfo("path"))
开发者ID:nadav1110,项目名称:mash2k3-repository,代码行数:25,代码来源:oneclickwatch.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")
开发者ID:alejusar,项目名称:starthere,代码行数:7,代码来源:dpstreaming.py
示例6: History
def History():
main.GA("None","WatchHistory")
if selfAddon.getSetting("whistory") == "true":
history_items = wh.get_my_watch_history()
for item in history_items:
item_title = item['title']
item_url = item['url']
item_image = item['image_url']
item_fanart = item['fanart_url']
item_infolabels = item['infolabels']
item_isfolder = item['isfolder']
if item_image =='':
item_image= art+'/noimage.png'
main.addLink(item_title,item_url,item_image)
else:
dialog = xbmcgui.Dialog()
ok=dialog.ok('[B]MashUp History[/B]', 'Watch history is disabled' ,'To enable go to addon settings','and enable Watch History')
history_items = wh.get_my_watch_history()
for item in history_items:
item_title = item['title']
item_url = item['url']
item_image = item['image_url']
item_fanart = item['fanart_url']
item_infolabels = item['infolabels']
item_isfolder = item['isfolder']
main.addLink(item_title,item_url,item_image)
开发者ID:philtimmes,项目名称:addons,代码行数:26,代码来源:default.py
示例7: playlistList3
def playlistList3(mname, murl):
main.GA("Playlists-" + mname, "Watched")
link = main.OPENURL(murl)
link = (
link.replace("\r", "")
.replace("\n", "")
.replace("\t", "")
.replace(" ", "")
.replace("type=playlistname=Sorted by user-assigned order", "")
.replace("name=Sorted [COLOR=FF00FF00]by user-assigned order[/COLOR]", "")
.replace("name=Live Tv Channels Twothumb", "")
)
match = re.compile("name=(.+?)thumb=(.+?)date=.+?URL=(.+?)#").findall(link)
for name, thumb, url in match:
match2 = re.compile("http://(.+?)URL").findall(thumb)
if len(match2) > 0:
thumb = "http://" + match2[0]
url = url.replace("player=defaultrating=-1.00", "")
match3 = re.compile("rtmp").findall(url)
match4 = re.compile("timeout").findall(url)
if len(match3) > 0 and len(match4) == 0:
url = url + " timeout=15"
main.addLink(name, url, thumb)
match = re.compile("name=(.+?)thumb=(.+?)URL=(.+?)#").findall(link)
for name, thumb, url in match:
match2 = re.compile("http://(.+?)URL").findall(thumb)
if len(match2) > 0:
thumb = "http://" + match2[0]
url = url.replace("player=defaultrating=-1.00", "").replace("%20", " ").replace("player=default", "")
match3 = re.compile("rtmp").findall(url)
match4 = re.compile("timeout").findall(url)
if len(match3) > 0 and len(match4) == 0:
url = url + " timeout=15"
main.addLink(name, url, thumb)
开发者ID:rollysalvana,项目名称:pampereo-xbmc-plugins,代码行数:34,代码来源:naviplaylists.py
示例8: 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")
开发者ID:Segfaulter,项目名称:mash2k3-repository,代码行数:32,代码来源:rlsmix.py
示例9: 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')
开发者ID:the-one-,项目名称:MashUp,代码行数:30,代码来源:tvrelease.py
示例10: Mplaylists
def Mplaylists(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'
match=re.compile('<name>(.+?)</name><link>(.+?)</link><thumbnail>(.+?)</thumbnail><date>(.+?)</date>').findall(link)
for name,url,thumb,date in match:
if '</vip>' in url:
main.addDirc(name+' [COLOR red] '+date+'[/COLOR]',url,260,thumb,'',fan,'','','')
else:
main.addDirc(name+' [COLOR red] '+date+'[/COLOR]',url,236,thumb,'',fan,'','','')
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,'',fan,'','','')
main.GA("MoviePL",vip+"-Directory")
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:27,代码来源:movieplaylist.py
示例11: playlistList3
def playlistList3(mname,murl):
main.GA("Playlists-"+mname,"Watched")
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('type=playlistname=Sorted by user-assigned order','').replace('name=Sorted [COLOR=FF00FF00]by user-assigned order[/COLOR]','').replace('name=Live Tv Channels Twothumb','')
match=re.compile('name=(.+?)thumb=(.+?)date=.+?URL=(.+?)#').findall(link)
for name,thumb,url in match:
match2=re.compile('http://(.+?)URL').findall(thumb)
if len(match2)>0:
thumb ='http://'+match2[0]
url=url.replace('player=defaultrating=-1.00','')
match3=re.compile('rtmp').findall(url)
match4=re.compile('timeout').findall(url)
if len(match3)>0 and len(match4)==0:
url=url+' timeout=15'
main.addLink(name,url,thumb)
match=re.compile('name=(.+?)thumb=(.+?)URL=(.+?)#').findall(link)
for name,thumb,url in match:
match2=re.compile('http://(.+?)URL').findall(thumb)
if len(match2)>0:
thumb ='http://'+match2[0]
url=url.replace('player=defaultrating=-1.00','').replace('%20',' ').replace('player=default','')
match3=re.compile('rtmp').findall(url)
match4=re.compile('timeout').findall(url)
if len(match3)>0 and len(match4)==0:
url=url+' timeout=15'
main.addLink(name,url,thumb)
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:26,代码来源:naviplaylists.py
示例12: playlistList6
def playlistList6(mname,murl):
main.GA("Playlists-"+mname,"Watched")
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('type=playlistname=Sorted by user-assigned order','').replace('name=Sorted [COLOR=FF00FF00]by user-assigned order[/COLOR]','').replace('name=Live Tv Channels Twothumb','')
match=re.compile('<item><titl[^>]+>([^<]+)</title><link>(.+?)</link><thumbnail>(.+?)</thumbnail></item>').findall(link)
for name,url,thumb in sorted(match):
main.addLink(name,url,thumb)
开发者ID:HIGHWAY99,项目名称:MashUp,代码行数:7,代码来源:naviplaylists.py
示例13: Mplaylists
def Mplaylists(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"
match = re.compile("<name>(.+?)</name><link>(.+?)</link><thumbnail>(.+?)</thumbnail><date>(.+?)</date>").findall(
link
)
for name, url, thumb, date in match:
if "</vip>" in url:
main.addDirc(name + " [COLOR red] " + date + "[/COLOR]", url, 260, thumb, "", fan, "", "", "")
else:
main.addDirc(name + " [COLOR red] " + date + "[/COLOR]", url, 236, thumb, "", fan, "", "", "")
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, "", fan, "", "", "")
main.GA("MoviePL", vip + "-Directory")
开发者ID:himag1,项目名称:MashUp,代码行数:31,代码来源:movieplaylist.py
示例14: LIST
def LIST(murl):
main.addLink('[COLOR red]Not the best source, but some links work in HSBS[/COLOR]','mess',art+'/link.png')
main.addLink('[COLOR red]Try to avoid the same Hosts that are in groups of 4, possible rar files[/COLOR]','mess',art+'/link.png')
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
link=main.unescapes(link)
match=re.compile('''entry-title'><a href='(.+?)'>.+?<img alt="(.+?)" src="(.+?)"''').findall(link)
dialogWait = xbmcgui.DialogProgress()
ret = dialogWait.create('Please wait until Movie list is cached.')
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,thumb in match:
name=name.replace('Download ','').replace('" height="400','')
main.addPlayM(name,url,225,thumb,'','','','','')
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()):
return False
dialogWait.close()
del dialogWait
paginate=re.compile("""<a class='blog-pager-older-link' href='(.+?)' id='.+?' title='.+?'>Next.+?</a>""").findall(link)
if (len(paginate)>0):
for purl in paginate:
main.addDir('[COLOR blue]Next[/COLOR]',purl,224,art+'/next2.png')
开发者ID:rollysalvana,项目名称:pampereo-xbmc-plugins,代码行数:28,代码来源:mkvmovies.py
示例15: MAINNHL
def MAINNHL(murl):
source_media = {}
from datetime import datetime
datex=datetime.now().strftime('%Y%m%d')
xml='http://live.nhl.com/GameData/SeasonSchedule-20142015.json'
link=main.OPENURL(xml)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace(' ','')
main.addDir('[COLOR red]Archived Games[/COLOR]','Archived',394,art+'/nhl.png')
if 'Archived' not in murl:
main.addLink("[COLOR red]Live Games Windows Only, Requires some modifications to get working visit forum.[/COLOR]",'','')
match=re.compile('{"id":(.+?),"est":"(.+?)","a":"(.+?)","h":"(.+?)"}',re.DOTALL).findall(link)
for id,timed,ateam,hteam in match:
split= re.search('(.+?)\s(\d+:\d+):\d+',timed)
split1=str(split.group(1))
split2=str(split.group(2))
if 'Archived' in murl:
if int(split1)<=int(datex):
dates= re.search('(\d{4})(\d{2})(\d{2})',split1)
date=str(dates.group(2))+"/"+str(dates.group(3))+"/"+str(dates.group(1))
timed = time.strftime("%I:%M %p", time.strptime(split2, "%H:%M"))
main.addDir(ateam+' at '+hteam+' [COLOR red]('+timed+')[/COLOR] [COLOR blue]('+date+')[/COLOR]',id,395,art+'/nhl.png')
else:
if datex == split1:
dates= re.search('(\d{4})(\d{2})(\d{2})',split1)
date=str(dates.group(2))+"/"+str(dates.group(3))+"/"+str(dates.group(1))
timed = time.strftime("%I:%M %p", time.strptime(split2, "%H:%M"))
main.addDir(ateam+' at '+hteam+' [COLOR red]('+timed+')[/COLOR] [COLOR blue]('+date+')[/COLOR]',id,395,art+'/nhl.png')
开发者ID:alejusar,项目名称:starthere,代码行数:28,代码来源:nhl.py
示例16: 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,182,thumb)
match=re.compile('<title>([^<]+)</title.+?link>(.+?)</link.+?thumbnail>([^<]+)</thumbnail>').findall(link)
for name,url,thumb in sorted(match):
main.addPlayL(name+' [COLOR blue]'+vip+'[/COLOR]',url,183,thumb,'',fan,'','','',secName=vip,secIcon=art+'/'+vip.lower()+'.png')
main.GA(vip+"-Playlists",mname)
开发者ID:Pirata-Repository,项目名称:Pirata,代码行数:27,代码来源:vipplaylist.py
示例17: LISTTV4
def LISTTV4(murl):
main.addDir('Search Rlsmix','rlsmix',136,"%s/art/search.png"%selfAddon.getAddonInfo("path"))
main.addLink('[COLOR red]First turbobit Link could be HD[/COLOR]','',"%s/art/tvb.png"%selfAddon.getAddonInfo("path"))
urllist=['http://www.rlsmix.net/category/tv-shows/','http://www.rlsmix.net/category/tv-shows/page/2/','http://www.rlsmix.net/category/tv-shows/page/3/','http://www.rlsmix.net/category/tv-shows/page/4/','http://www.rlsmix.net/category/tv-shows/page/5/','http://www.rlsmix.net/category/tv-shows/page/6/','http://www.rlsmix.net/category/tv-shows/page/7/','http://www.rlsmix.net/category/tv-shows/page/8/','http://www.rlsmix.net/category/tv-shows/page/9/','http://www.rlsmix.net/category/tv-shows/page/10/']
dialogWait = xbmcgui.DialogProgress()
ret = dialogWait.create('Please wait until Show list is cached.')
totalLinks = 10
loadedLinks = 0
remaining_display = 'Pages loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display)
for murl in urllist:
link=main.OPENURL(murl)
link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
match=re.compile('<h1 class="titles"><a href="(.+?)" title="Permanent Link to (.+?)">.+?src="http://uppix.net/(.+?)"').findall(link)
for url,name,thumb in match:
match2=re.compile('TV Round Up').findall(name)
name=name.replace('\xc2\xa0','').replace('" ','').replace(' "','').replace('"','').replace("'","'").replace("&","and").replace("’","'").replace("amp;","and").replace("#8211;","-")
if len(match2)==0:
main.addDir(name,url,62,'http://uppix.net/'+thumb)
loadedLinks = loadedLinks + 1
percent = (loadedLinks * 100)/totalLinks
remaining_display = 'Pages loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].'
dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display)
if (dialogWait.iscanceled()):
return False
dialogWait.close()
del dialogWait
main.GA("TV","Rlsmix")
开发者ID:Segfaulter,项目名称:mash2k3-repository,代码行数:29,代码来源:rlsmix.py
示例18: 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
示例19: LISTSP5
def LISTSP5(murl):
nrDomain = GetNewUrl();
murl=nrDomain+'/latest.php'
lurl=nrDomain+'/login2.php'
net().http_POST(lurl,{'email':user,'password':passw})
response = net().http_GET(murl)
link = response.content
if response.get_url() != murl:
xbmc.executebuiltin("XBMC.Notification(Sorry!,Email or Password Incorrect,10000,"+smalllogo+")")
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'',art+'/link.png')
match=re.compile("<br>(.+?) - <a[^>]+?href='(.+?)'>(.+?)</a>").findall(link)
dialogWait = xbmcgui.DialogProgress()
ret = dialogWait.create('Please wait until Movie list is cached.')
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)
id = 1;
for year,url,name in match:
name=main.unescapes(name)
if(year=='0'):
year='0000'
url=nrDomain+url
main.addDown3(name+' [COLOR red]('+year+')[/COLOR]',url,58,'','',id)
id += 1
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()):
return False
dialogWait.close()
del dialogWait
main.GA("HD","Starplay")
main.VIEWS()
开发者ID:kragen4,项目名称:MashUp,代码行数:35,代码来源:starplay.py
示例20: AZLISTNB
def AZLISTNB(murl):
nrDomain = GetNewUrl()
if selfAddon.getSetting("hide-download-instructions") != "true":
main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'',art+'/link.png')
match=re.compile("href='(.+?)'>(.+?)</a>").findall(murl)
dialogWait = xbmcgui.DialogProgress()
ret = dialogWait.create('Please wait until Movie list is cached.')
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 in match:
name=fix_title(main.unescapes(name))
url=nrDomain+url
loadedLinks += 1
name = name.decode('iso-8859-1').encode('utf8')
main.addDown3(name,url,58,'','',loadedLinks)
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()):
return False
dialogWait.close()
del dialogWait
main.GA("Noobroom","List")
main.VIEWS()
开发者ID:philtimmes,项目名称:addons,代码行数:26,代码来源:starplay.py
注:本文中的resources.libs.main.addLink函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论