def Vice(murl): main.GA("Documentary","Vice") link=main.OPENURL(murl) match=re.compile('<a href="(.+?)"><img width=".+?" height=".+?" src="(.+?)" /></a> <h2><a href=".+?">(.+?)</a></h2>\n <p>(.+?)</p>').findall(link) for url,thumb,name,desc in match: url='http://www.vice.com'+url main.addDir2(name,url,105,thumb,desc)
def LISTDOC(murl): if murl=='doc1': main.GA("Documantary","DhHome") main.addDir('[COLOR red]Search[/COLOR]','search',89,'') main.addDir('[COLOR red]Popular[/COLOR]','http://documentaryheaven.com/popular/',89,'') main.addDir('[COLOR red]Recent[/COLOR]','http://documentaryheaven.com/all/',87,'') url='http://documentaryheaven.com/' link=main.OPENURL(url) match=re.compile('<li class=".+?"><a href="(.+?)" title=".+?">(.+?)</a> </li>').findall(link) for url, name in match: main.addDir(name,url,87,'') elif murl=='doc2': main.GA("Documantary","TDFHome") main.addDir('[COLOR red]Recent[/COLOR]','http://topdocumentaryfilms.com/all/',87,'') main.addDir('[COLOR red]Recommended[/COLOR]','rec',89,'') url='http://topdocumentaryfilms.com/' link=main.OPENURL(url) match=re.compile('href="(.+?)" title=".+?">(.+?)</a>.+?</li>').findall(link) for url, name in match: main.addDir(name,url,87,'') elif murl=='doc3': main.GA("Documantary","DLHome") main.addDir('[COLOR red]Latest[/COLOR]','http://www.documentary-log.com/',87,'') main.addDir("[COLOR red]Editor's Picks[/COLOR]",'http://www.documentary-log.com/category/editors-picks/',87,'') url='http://www.documentary-log.com/' link=main.OPENURL(url) match=re.compile('<li class="cat-item cat-item-.+?"><a href="(.+?)" title="(.+?)">(.+?)</a> ([^<]+)').findall(link) for url, desc, name, leng in match: main.addDir2(name+' '+leng,url,87,'',desc)
def LISTEpilistBTV(mname,murl): link=main.OPENURL(murl) season=re.compile('http://www.btvguide.com/.+?/watch-online/(.+?)/.?#.+?').findall(murl) seas=season[0] seas=seas.replace('+','-') link=link.replace('\r','').replace('\n','').replace('\t','') match=re.compile('<img class="thumb lazy" data-original="([^<]+)" src=".+?".+?<a class="title" href="([^<]+)">([^<]+)</a><br/><div class="ep_info">([^<]+)</div></div><div class=".+?"><div class="date">([^<]+)</div></div></div><div class="description">([^<]+)</div>').findall(link) for thumb,url,epiname,epinum,date,desc in match: match2=re.compile(seas).findall(url) if len(match2)>0: main.addDir2('[COLOR red]'+epinum+'[/COLOR] "'+epiname+'"',url,559,thumb,desc)
def SEASONS(mname, url, thumb): if thumb == None: thumb = "" if "http://www.tubeplus.me/" not in url: url = BASE_URL + url html = main.OPENURL2(url) r = re.findall(r'id="l(sea.+?)" class="season"', html, flags=re.DOTALL | re.M) for seasons in r: linkback = seasons seasons = seasons.replace("_", " ").replace("season", "Season") meta_name = mname + " " + seasons main.addDir2(meta_name, url, 1050, thumb, linkback)
def SEASONS(mname,url,thumb): if thumb == None: thumb='' if 'http://www.tubeplus.me/' not in url: url=BASE_URL+url html = main.OPENURL2(url) r = re.findall(r'id="l(sea.+?)" class="season"',html,flags=re.DOTALL|re.M) for seasons in r: linkback=seasons seasons=seasons.replace('_',' ').replace('season','Season') meta_name = mname+' '+seasons main.addDir2(meta_name,url,1050,thumb,linkback)
def iWatchLISTSHOWS(murl): main.GA("Tvshows","List") link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match=re.compile('<a href="(.+?)" class=".+?" rel=".+?"><img class=".+?" src="(.+?)" alt=""> <div class=".+?">.+?</div> </a><div class=".+?">(.+?)<div class=".+?"><div class=".+?" data-rating=".+?"></div></div></div><div class=".+?">(.+?)<br />').findall(link) for url,thumb,name,desc in match: main.addDir2(name,url,590,thumb,desc) print len(match) if len(match)==25: paginate=re.compile('([^<]+)start=([^<]+)').findall(murl) for purl,page in paginate: i=int(page)+25 main.addDir('[COLOR blue]Next[/COLOR]',purl+'start='+str(i),589,"%s/art/next2.png"%selfAddon.getAddonInfo("path")) xbmcplugin.setContent(int(sys.argv[1]), 'Movies') main.VIEWS()
def LISTNEWShowsBTV(murl): desclist=[] i=0 link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','') descr=re.compile('<span class=\'_more_less\'>([^<]+)').findall(link) if len(descr)>0: for desc in descr: desclist.append(desc) match=re.compile('<a href="([^<]+)" title="([^<]+)"><img src="([^<]+)" alt=".+?" title=".+?" width=".+?" height=".+?" />').findall(link) for url, name, thumb in match: main.addDir2(name,url,553,thumb,desclist[i]) i=i+1 paginate = re.compile('<a href="([^<]+)">></a>').findall(link) if len(paginate)>0: main.addDir('Next','http://www.btvguide.com'+paginate[0],564,"%s/art/next2.png"%selfAddon.getAddonInfo("path"))
def iWatchSeason(name,murl): link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') descs=re.compile('<meta name="description" content="(.+?)">').findall(link) if len(descs)>0: desc=descs[0] else: desc='' thumbs=re.compile('<div class="movie-cover span2"><img src="(.+?)" alt=".+?" class=".+?" />').findall(link) if len(thumbs)>0: thumb=thumbs[0] else: thumb='' match=re.compile('<h5><i class=".+?"></i> (.+?)</h5>').findall(link) for season in match: main.addDir2(name+' '+season,murl,591,thumb,desc)
def LISTEpilistBTV(mname,murl): link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace('"src="http://static0.btvguide.com/images/nocoverbig.png','').replace('|','') match=re.compile('<img class=.+?="(.+?)".+?="(.+?) BTVGuide".+?<a class="title" href="(.+?)"').findall(link) for thumb, name, url in match: main.addDir2(name,url,559,thumb,'')
def iWatchSeason(name,murl,thumb): link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match=re.compile('<h5><i.+?</i>.*?(.+?)</h5>').findall(link) for season in match: main.addDir2(name+' '+season,murl,591,thumb,'')