def Index(url): link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\xc3\x9a','U').replace('\t','').replace(' ','').replace('\\','').replace('\xc3\xa9','e').replace('\xc3\xb3','o').replace('–','-').replace('\xc3\xa7\xc3\xa3','c').replace('\xc3\xad','i').replace('\xc2\xaa','').replace('’',"'") match = re.findall('class="capa"> <a href="([^"]*)" class="absolute-capa no-text">[^"]*</a> <img src="([^"]*)" alt="([^"]*)" />',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait, while 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,thumb,name in match: name=name.replace('\r','').replace('\n','').replace('\xc3\x9a','U').replace('\t','').replace(' ','').replace('\\','').replace('\xc3\xa9','e').replace('\xc3\xb3','o').replace('–','-').replace('\xc3\xa7\xc3\xa3','c').replace('\xc3\xad','i').replace('\xc2\xaa','').replace('’',"'") #main.addInfo(name,url,100,thumb,'','') main.addDown2("[COLOR blue]"+name.strip()+"[/COLOR]",url,100,thumb,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 olderentries=re.compile('class="next page-numbers" href="([^"]*)">»</a>').findall(link) for url in olderentries: main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,1,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
def List2(url): link = main.OPEN_URL(url) match = re.compile( 'class="contentarchivetime">([^"]*)</div><div class="contentarchivetitle"><a href="([^"]*)" title=".+?">([^"]*)</a></div>' ).findall(link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Show list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Episodes loaded :: [B]' + str( loadedLinks) + ' / ' + str(totalLinks) + '[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]', remaining_display) for date, url, name in match: name = name.replace('–', ' - ').replace(''', "'") #main.addPlayTE(name+' [COLOR red]'+date+'[/COLOR]',url,5,'','','','','','') main.addDirTE(name + ' [COLOR red]' + date + '[/COLOR]', url, 865, '', '', '', '', '', '') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100) / totalLinks remaining_display = 'Episodes 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( '="nextpostslink" rel="next" href="([^"]*)">»</a>').findall(link) if paginate: xurl = paginate[0] main.addDir('[COLOR blue]Next Page' + '[/COLOR]', xurl, 864, art + '/next2.png')
def TVGenres(url,name): ################# TV Genre List ################# link=main.OPEN_URL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','') match = re.findall('<a href="http://www.thedarewall.com/tv/tv-categories/([^"]*)">([^"]*)</a>',link) for url,name in match: url = 'http://www.thedarewall.com/tv/tv-categories/' + url + '/abc' main.addDir(name,url,5,'')
def TVIndex2(url,name): ################# TV TAG Index ################# link=main.OPEN_URL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','') match = re.findall('src="http://www.thedarewall.com/tv/templates/svarog/timthumb.php[?]src=([^"]*)&w=[^"]*&h=[^"]*&zc=1" alt=" "/> </a> </div> <h5> <a class="link" href="([^"]*)" title="([^"]*)">[^"]*</a>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Show list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Tv Episodes Loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) for thumb,url,name in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-') #main.addInfo(name,url,7,thumb,'','') main.addDirTE(name,url,7,thumb,'','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Tv Episodes 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 nextpage=re.compile('<li><a href="([^"]*)">»</a></li> </ul></div><form method="post"').findall(link) for url in nextpage: main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,3,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')
def INDEX(url): np_url = '' link = net.http_GET(url).content match=re.compile('<a href="(.+?)" class="post-info-title" title="Permanent Link to (.+?)">').findall(link) np=re.compile("<a href=\'(.+?)' class=\'(.+?)\'>.+?</a>").findall(link) for np_url,name in np: if name == 'nextpostslink': if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',np_url,'fullEpisodeIndex',artwork + '/main/next.png') for url, name in match: head,sep,tail = name.partition('Season') show = head numbers = tail.replace('Episode','x') numbers = numbers.replace(' ','') name = show + numbers try: main.addEDir(name,url,'fullEpisodeVideoLinks','',show) except: continue for np_url,name in np: if name == 'nextpostslink': if settings.getSetting('nextpagebottom') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',np_url,'fullEpisodeIndex',artwork + '/main/next.png') main.AUTOVIEW('episodes')
def SEARCH(url = ''): encode = main.updateSearchFile(url,'Movies') if not encode: return False surl='http://www.filmesonlinegratis.net/?s=' + encode + '&s-btn=Buscar' link=main.OPEN_URL(surl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('– ',' - ') match = re.findall('title="([^"]*)">[^"]*</a></h2><divclass="capa"> <ahref="([^"]*)"><imgsrc="http://static.filmesonlinegratis.net/thumb.php[?]src=([^"]*)&w=135&h=185" alt="[^"]*" title="[^"]*" /></a> <spanclass="qualidade">([^"]*)</span>',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 name,url,thumb,quality in match: #main.addDirb(name+'[COLOR blue] Quality: '+quality+'[/COLOR]',str(url),8,thumb,'') main.addInfo(name+'[COLOR blue] Quality: '+quality+'[/COLOR]',url,8,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 nextpage=re.compile('href="([^"]*)">\xc2\xbb</a>').findall(link) for url in nextpage: main.addDir('Next Page >>',base_url+url,1,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Movies') main.VIEWS()
def HD_ANIMATION(): main.addDir('Popular', base_url + '/movies?gener=animation&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=animation&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def INDEX(url): req = urllib2.Request(url) req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3') response = urllib2.urlopen(req) link=response.read() response.close() match=re.compile('<a href=".+?" title=".+?">(.+?)</a></h1>\n\t\t\n\t\t\n\t</header>\n\n\t<div class=".+?">\n\t\t<a href="(.+?)"><img src="(.+?)" alt=".+?" width=".+?" height=".+?" class=".+?" /></a>').findall(link) np=re.compile('<strong>.+?</strong><a href="(.+?)">').findall(link) if len(np) > 0: next_page = np[0] main.addDir('Next Page',next_page,'videoCloudIndex',artwork + '/main/next.png') for name,url,thumbnail in match: if len(match) > 0: head, sep, tail = name.partition(')') name = head[:-5] year = head[-5:] + sep try: req = urllib2.Request(url) req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3') response = urllib2.urlopen(req) links=response.read() response.close() vid_link=re.compile('<source src="(.+?)"').findall(links) except: continue try: main.addMDir(name,vid_link[0],'resolve',thumbnail,year,False) except: continue main.AUTOVIEW('movies')
def SERIES_INDEX(url): link = net.http_GET(url).content np=re.compile('<li class="next pagea"><a href="(.+?)">Next →</a>').findall(link) match=re.compile('<a href="(.+?)" class=".+?" rel=".+?">\r\n\t\t\t\t\t\t\t<img class=".+?" src="(.+?)" alt="">\r\n\t\t\t\t\t\t\t <div class=".+?">.+?</div>\t \r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t<div class=".+?">.+?').findall(link) if len(np) > 0: next_page = np[0] next_page = next_page.replace('&','&') next_page = next_page.replace('movies','tv-show') if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',next_page,'iwoSeriesIndex',artwork + '/main/next.png') for url,thumbnail in match: head,sep,tail = url.partition('/tv-shows/') head,sep,tail = url.partition('-') split = re.split('\d\d\d\d\d-',tail) try: name = str(split[1]) except: continue name = name.replace('-',' ') name = name.title() if name == 'Battlestar Galactica': name = 'Battlestar Galactica (2003)' try: main.addSDir(name,url,'iwoEpisodesIndex',thumbnail,False) except: continue if settings.getSetting('nextpagebottom') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',next_page,'iwoSeriesIndex',artwork + '/main/next.png') main.AUTOVIEW('tvshows')
def HD_ADVENTURE(): main.addDir('Popular', base_url + '/movies?gener=adventure&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=adventure&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def MOVIE_INDEX(url): next_page = '' link = net.http_GET(url).content np=re.compile('<li class="next pagea"><a href="(.+?)">Next →</a>').findall(link) match=re.compile('<a href="(.+?)" class=".+?" rel=".+?">\r\n\t\t\t\t\t\t\t<img class=".+?" src="(.+?)" alt="">\r\n\t\t\t\t\t\t\t <div class=".+?">.+?</div>\t \r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t<div class=".+?">.+?').findall(link) if len(np) > 0: next_page = np[0] next_page = next_page.replace('&','&') if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',next_page,'iwoIndex',artwork + '/main/next.png') for url,thumbnail in match: head,sep,tail = url.partition('/movie/') head,sep,tail = url.partition('-') year = tail[-4:] year = '(' + year + ')' name = tail[:-4] name = re.sub('-s','s',name) name = re.sub('-',' ',name) name = re.sub("'",'',name) name = name.title() try: main.addMDir(name,url,'iwoVideoLinks',thumbnail,year,False) except: continue if len(np) > 0: if settings.getSetting('nextpagebottom') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',next_page,'iwoIndex',artwork + '/main/next.png') main.AUTOVIEW('movies')
def INDEX(url): link = net.http_GET(url).content match=re.compile('<a href=".+?">.+?</a>\n </div>\n <div class="img_preview_item"> <a href="(.+?)"><img src="(.+?)" width=".+?" height=".+?" alt="(.+?)" /></a>').findall(link) np=re.compile("<a href='(.+?)' id='next'>Next</a>").findall(link) if len(np) > 0: np_url = base_url + '/' + np[0] main.addDir('Next Page',np_url,'epornikIndex', artwork + '/main/next.png') for url,thumbnail,name in match: if name == 'evil 4 2010': continue if name == 'evil 3 2007': continue if name == 'evil 2 2004': continue if name == 'evil 1': continue if name == 'lkesi 4': continue else: url = base_url + url thumbnail = base_url + thumbnail try: link = net.http_GET(url).content match=re.compile('"file","(.+?)"').findall(link) main.addDir(name,match[0],'resolve',thumbnail) except: continue
def GRABXXX(url): link = XXX_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(' ', '') #main.addLink("[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]",'','') moviename = re.compile( 'watch-xxx.php[?]id=[^"]*&movie=([^"]*)&link=[^"]*&type=xxx&ref=1' ).findall(link) for moviename in moviename: match = re.compile( 'href="info.php[?]id=([^"]*)&xxx&link=([^"]*)&host=([^"]*)"><div class="[^"]*"><span class="([^"]*)">' ).findall(link) for link1, link2, host, quality in match: if 'epornik' in host: url = base_url + 'watch-xxx.php?id=' + link1 + '&movie=' + moviename + '&link=' + link2 + '&type=xxx&ref=1' main.addDir( moviename.replace('+', ' ').strip() + " [COLOR yellow]" + host.upper() + "[/COLOR]", url, 73, '.png', '.png') else: url = base_url + 'watch-xxx.php?id=' + link1 + '&movie=' + moviename + '&link=' + link2 + '&type=xxx&ref=1' main.addDown2( moviename.replace('+', ' ').strip() + " [COLOR blue]" + host.upper() + "[/COLOR]", url, 72, '.png', '.png')
def Episodes(url, season): req = urllib2.Request(url) req.add_header("User-Agent", USER_AGENT) response = urllib2.urlopen(req) link = response.read().replace("'", "'") response.close() season = str(season) print "SeaSon:" + season match = re.compile( '<a href="info.php[?]id=([^"]*)&season=' + season + '&episode=([^"]*)&tv">[^"]*<span class="ep_title">([^"]*)</span> <span class="total">([^"]*)</span>' ).findall(link) # match.sort() # sort list so it shows first episode first for linkid, episode, title, links in match: url = base_url + "info.php?id=" + linkid + "&season=" + season + "&episode=" + episode + "&tv" name = ( "[COLOR green]" + "Episode " + episode + "[/COLOR] " + "[COLOR aqua]" + title + "[/COLOR] " + "[COLOR red]" + links + "[/COLOR]" ) main.addDir(name, url, 14, "", "")
def HD_BIOGRAPHY(): main.addDir('Popular', base_url + '/movies?gener=biography&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=biography&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def INDEX(url): link = net.http_GET(url).content match=re.compile('<a href="(.+?)"><img src="(.+?)" width=".+?" title=".+?" alt="(.+?)"></a>').findall(link) np=re.compile('<a href="/(.+?) " >').findall(link) if len(np) > 0: np_url = base_url + '/' + str(np[0]) if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',np_url,'mmlineIndex',artwork + '/main/next.png') inc = 0 if len(match) > 0: for url,thumbnail,name in match: inc += 1 if inc > 8: movie_name = name[:-6] year = name[-6:] try: main.addMDir(movie_name,base_url + url,'mmlineVideoLinks',base_url+thumbnail,year,False) except: pass if len(np) > 0: if settings.getSetting('nextpagebottom') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',np_url,'mmlineIndex',artwork + '/main/next.png') main.AUTOVIEW('movies')
def HD_DOCUMENTARY(): main.addDir('Popular', base_url + '/movies?gener=documentary&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=documentary&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def YEARB(murl): link=main.OPENURL(murl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match=re.compile('<div class="movie_pic"><a href="(.+?)" target=".+?"> <img src="(.+?)" width=".+?" height=".+?" /> </a></div> <div class=".+?"> <div class=".+?"> <h1><a href=".+?" target=".+?"> (.+?) </a></h1> <div class=".+?">Genre: <a href=".+?" target=\'.+?\'>(.+?)</a>.+?Release:.+?Views: <span> (.+?) </span>.+?<span id=RateCount.+?> (.+?) </span> votes.+?<div id=".+?">score:<span id=Rate_.+?>(.+?)</span>').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,thumb,name,genre,views,votes,rating in match: name=name.replace('-','').replace('&','').replace('acute;','') furl= 'http://movie25.com/'+url main.addInfo(name+'[COLOR blue] Views: '+views+'[/COLOR] [COLOR red]Votes: '+votes+'[/COLOR] [COLOR green]Rating: '+rating+'[/COLOR]',furl,3,thumb,genre,'') 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 ye = murl[39:44] r = re.findall("Next</a><a href='search.php.?page=.+?year=.+?'>Last</a>",link) if r: main.addDir('[COLOR red]Enter Page #[/COLOR]',murl,208,art+'/gotopage.png') main.addDir('[COLOR blue]Page 2[/COLOR]','http://www.movie25.com/search.php?page=2&year='+str(ye),9,art+'/next2.png') xbmcplugin.setContent(int(sys.argv[1]), 'Movies') main.VIEWS()
def HD_FILMNOIR(): main.addDir('Popular', base_url + '/movies?gener=film-noir&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=film-noir&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def MoviesTags(url,name): ################# Movie Genre List ################# link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','') match = re.findall('<a href="http://www.thedarewall.com/tv/movie-tags/([^"]*)">([^"]*)</a>',link) for url,name in match: url = 'http://www.thedarewall.com/tv/movie-tags/' + url main.addDir(name,url,13,'')
def HD_HISTORY(): main.addDir('Popular', base_url + '/movies?gener=history&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=history&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def TV(url): link=main.OPEN_URL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('– ',' - ').replace('#038;','') match = re.findall('title="([^"]*)">[^"]*</a></h2><div class="capa"><a href="([^"]*html)"><img src="http://static.filmesonlinegratis.net/thumb.php[?]src=([^"]*)&w=135&h=185" alt="[^"]*" title="[^"]*" /></a>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Series list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Series loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) for name,url,thumb in match: #main.addInfo(name,url,10,thumb,'','') main.addDirTE(name,str(url),6,thumb,'','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Series 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 nextpage=re.compile('href="([^"]*)">\xc2\xbb</a>').findall(link) for url in nextpage: main.addDir('[COLOR aqua]'+'Next Page >>'+'[/COLOR]',base_url+url,11,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Movies') main.VIEWS()
def HD_MUSICAL(): main.addDir('Popular', base_url + '/movies?gener=musical&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=musical&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def TVIndex(url): ################# TV Index ################# link=main.OPEN_URL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','') match = re.findall('<img class="img-preview spec-border" src="([^"]*?)" alt=" " style="background.+?<a class="link" href="([^"]*?)" title=".+?">([^"]*?)</a>.+?</h5><p class="left">([^"]*?)</p>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Show list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Latest Episodes Loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) for thumb,url,name,season in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-') #main.addInfo(name+ ' ' + season,url,75,thumb,'','') main.addDirTE(name+ ' ' + season,url,75,thumb,'','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Latest Episodes 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 nextpage=re.compile('><a href="([^"]*?)">»</a></li> </ul> </div> <div class="show_all_btn"><ul class="pagination"><li>').findall(link) for url in nextpage: main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,1,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')
def HD_ROMANCE(): main.addDir('Popular', base_url + '/movies?gener=romance&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=romance&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def INDEX(url): req = urllib2.Request(url) req.add_header( 'User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ) response = urllib2.urlopen(req) link = response.read() response.close() match = re.compile( '<a href="(.+?)" title="(.+?)"> <img src="(.+?)" alt=".+?" height=".+?" width=".+?"/></a>' ).findall(link) np = re.compile("..</span> <a class=.+? href='(.+?)'> Next+").findall(link) if len(np) > 0: next_page = np[0] main.addDir('Next Page', next_page, 'zmovieIndex', artwork + '/main/next.png') for url, name, thumbnail in match: head, sep, tail = name.partition(')') name = head[:-5] year = head[-5:] + sep try: main.addMDir(name, url, 'zmovieVideoLinks', thumbnail, year, False) except: continue main.AUTOVIEW('movies')
def HD_THRILLER(): main.addDir('Popular', base_url + '/movies?gener=thriller&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=thriller&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def Series(url): link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xc3\xa9','e').replace('\xc3\xb3','o').replace('–','-').replace('\xc3\xa7\xc3\xa3','c').replace('\xc3\xad','i').replace('\xc2\xaa','').replace('’',"'") match = re.findall('title="<img class=\'capa-search\' src=\'([^"]*)\'>" alt="([^"]*)\'">.+?<a href="([^"]*)" title="[^"]*">[^"]*</a>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait, while Series list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Series loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on.[/B]',remaining_display) for thumb,name,url in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace("(US)","-").replace(' ','-').replace('-&-','-').replace('&-','-') print url main.addInfo(name,url,6,thumb,'','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Series 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 olderentries=re.compile('href="([^"]*)">»</a>').findall(link) for url in olderentries: main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,3,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'TV')
def HD_WESTERN(): main.addDir('Popular', base_url + '/movies?gener=western&sort=popular&quality=hd', 'iwoIndex', artwork + '/main/popular.png') main.addDir('Recently Added', base_url + '/movies?gener=western&sort=latest&quality=hd', 'iwoIndex', artwork + '/main/recentlyadded.png')
def INDEX(url): req = urllib2.Request(url) req.add_header( 'User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ) response = urllib2.urlopen(req) link = response.read() response.close() match = re.compile( '<a\nhref="(.+?)" rel=".+?" > <img\nclass=".+?" src="(.+?)" width=".+?" height=".+?" title="Watch (.+?) Online Free" >' ).findall(link) np = re.compile("rel='next' href='(.+?)' /><link").findall(link) if len(np) > 0: next_page = np[0] main.addDir('Next Page', next_page, 'wwmfIndex', artwork + '/main/next.png') for url, thumbnail, name in match: try: main.addMDir(name, url, 'wwmfVideoLinks', thumbnail, '', False) print year except: continue main.AUTOVIEW('movies')
def SearchResults(url): link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\xa6','...').replace('–','-').replace('#038;','').replace(''',"'") match = re.findall('<div id="contentarchivetime">([^"]*)>></div><div id="contentarchivetitle"><a href="([^"]*)" title="[^"]*">([^"]*)</a>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait while Search is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Search Results loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) for date,url,name in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-').replace(''',"'") main.addDir(name,url,75,'') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Search Results 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 nextpage=re.compile("<a href='([^>]+)' class='nextpostslink'>></a>").findall(link) for url in nextpage: name = '[COLOR green] Next Page -> [/COLOR]' main.addDir(name,url,11,'')
def SEARCHTV(url=""): encode = main.updateSearchFile(url, "TV") if not encode: return False surl = base_url + "index.php?search=" + encode + "&tv=&x=0&y=0" link = main.OPENURL(surl) link = link.replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "") match = re.findall( '<a href="([^"]*)"><img alt="[^"]*" src="([^"]*)" /></a><div class="title"><a title="[^"]*" href="[^"]*">([^"]*)</a></div><ul class=\'star-rating\'><li class="current-rating" style="[^"]*"></li></ul><div class="item-genres"><a href="[^"]*">([^"]*)</a>', 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, thumb, name, genre in match: name = name.replace("-", "").replace("&", "").replace("acute;", "").strip() main.addDir(name + "[COLOR blue] Genre: " + genre + "[/COLOR]", base_url + url, 12, "", "") 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 nextpage = re.compile('<a href="([^"]*)" class="next">Next »</a>').findall(link) for url in nextpage: main.addDir("Next Page >>", base_url + url, 1, art + "/next.png") xbmcplugin.setContent(int(sys.argv[1]), "Movies") main.VIEWS()
def Index(url): link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-') match = re.findall('<a href="([^"]*)" rel="bookmark" title="[^"]*"><img src="([^"]*)" width="120px" height="178px" alt="([^"]*)" /></a></div>.+?<p class="postmetadata">Updated: ([^"]*)</p>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Show list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Tv Shows loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) for url,thumb,name,date in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-') main.addInfo(name+'[COLOR green] Updated: '+date+'[/COLOR]',url,75,thumb,'','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Tv Shows 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 pagenext=re.compile('<a href=\'([^>]+)\' class=\'nextpostslink\'>></a>').findall(link) for url in pagenext: main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,1,art+'/next2.png') xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')
def UFCMOVIE25(): surl = "http://www.movie25.so/search.php?key=ufc&submit=" link = main.OPENURL(surl) link = link.replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "") match = re.compile( '<div class="movie_pic"><a href="(.+?)" target=".+?"> <img src="(.+?)" width=".+?" height=".+?" /> </a></div> <div class=".+?"> <div class=".+?"> <h1><a href=".+?" target=".+?"> (.+?) </a></h1> <div class=".+?">Genre: <a href=".+?" target=\'.+?\'>(.+?)</a>.+?Release:.+?Views: <span> (.+?) </span>.+?<span id=RateCount.+?> (.+?) </span> votes' ).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, thumb, name, genre, views, votes in match: name = name.replace("-", "").replace("&", "").replace("acute;", "").strip() furl = MainUrl + url main.addInfo( name + "(" + year + ")[COLOR blue] Views: " + views + "[/COLOR] [COLOR red]Votes: " + votes + "[/COLOR]", furl, 3, thumb, genre, "", ) 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.addDir("[COLOR blue]Page 2[/COLOR]", "http://www.movie25.so/search.php?page=2&key=ufc", 9, art + "/next2.png")
def CHIAGENREMAIN(url): link = net.http_GET(url).content match=re.compile('overflow:hidden;"> <a href="(.+?)" title="(.+?)"><img width=".+?" height=".+?" src="(.+?)"></a>').findall(link) for url,name,thumb in match: name = name.replace('View all episode in','') main.addDir(name,url,'chiaepisodes',thumb,'','') main.AUTO_VIEW('movies')
def INDEX(url): req = urllib2.Request(url) req.add_header( 'User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ) response = urllib2.urlopen(req) link = response.read() response.close() match = re.compile( '<a href="(.+?)"><img src="(.+?)" width=".+?" title=".+?" alt="(.+?)"></a>' ).findall(link) np = re.compile('<a href="/(.+?) " >').findall(link) if len(np) > 0: np_url = np[0] main.addDir('Next Page', np_url, 'freeOMovieIndex', artwork + '/main/next.png') inc = 0 if len(match) > 0: for url, thumbnail, name in match: inc += 1 if inc > 8: movie_name = name[:-6] year = name[-6:] movie_name = movie_name.decode('UTF-8', 'ignore') main.addMDir(movie_name, base_url + url, 'mmlineVideoLinks', base_url + thumbnail, year, False) main.AUTOVIEW('movies')
def CHIASEARCH(url): link = net.http_GET(url).content match=re.compile('<img style="padding-left:0px;" width="135" height="190" src="(.+?)"></a></div><div class="title"><a href="(.+?)">(.+?)</a></div>').findall(link) for thumb,url,name in match: #name = name.replace('View all episode in','') main.addDir(name,url,'chialinkpage',thumb,'','') main.AUTO_VIEW('movies')
def UFCMOVIE25(): surl='http://www.movie25.com/search.php?key=ufc&submit=' link=main.OPENURL(surl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match=re.compile('<div class="movie_pic"><a href="(.+?)" target=".+?"> <img src="(.+?)" width=".+?" height=".+?" /> </a></div> <div class=".+?"> <div class=".+?"> <h1><a href=".+?" target=".+?"> (.+?) </a></h1> <div class=".+?">Genre: <a href=".+?" target=\'.+?\'>(.+?)</a>.+?Release:.+?Views: <span> (.+?) </span>.+?<span id=RateCount.+?> (.+?) </span> votes.+?<div id=".+?">score:<span id=Rate_.+?>(.+?)</span>').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,thumb,name,genre,views,votes,rating in match: name=name.replace('-','').replace('&','').replace('acute;','') furl= 'http://movie25.com/'+url main.addInfo(name+'('+year+')[COLOR blue] Views: '+views+'[/COLOR] [COLOR red]Votes: '+votes+'[/COLOR] [COLOR green]Rating: '+rating+'[/COLOR]',furl,3,thumb,genre,'') 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.addDir('[COLOR blue]Page 2[/COLOR]','http://www.movie25.com/search.php?page=2&key=ufc',9,art+'/next2.png') main.GA("UFC","UFC_Movie25-List")
def CHIAALPHMAIN(url): link = net.http_GET(url).content match=re.compile('<img width=".+?" height=".+?" src="(.+?)"></a></p></div></td><div style="width:.+?; float:.+?;"><td class=".+?" style=".+?; overflow:.+?;"><div style="height:.+?; width:.+?;"><div style=".+?;"><a href="(.+?)" title="(.+?)">').findall(link) for thumb,url,name in match: name = name.replace('View all episode in','') main.addDir(name,url,'chiaepisodes',thumb,'','') main.AUTO_VIEW('movies')
def MoviesIndex(url,name): ################# Movie Index ################# link=main.OPEN_URL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','') match = re.findall('src="http://www.thedarewall.com/tv/templates/svarog/timthumb.php[?]src=([^"]*)&w=[^"]*&h=[^"]*&zc=1" alt=" " style=".+?<a class="link" href="([^"]*)" title="([^"]*)">.+?<div class="right"> <div style="float:right;display:block;color:#000;font-size:11px; font-weight: bold;">([^"]*)</div>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Show 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 thumb,url,name,rating in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-') main.addInfo(name+ ' ' + " Rating "+rating,url,80,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 nextpage=re.compile('><a href="([^"]*)">»</a></li> </ul></div><div class="clear">').findall(link) for url in nextpage: main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,1,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
def INDEX(url): print "eliinfo ################################################################# url" + url next_page = '' link = net.http_GET(url).content match = re.compile( '<a href="(.+?)" title="(.+?)"> <img src="(.+?)" alt=".+?" height=".+?" width=".+?"/></a>' ).findall(link) np = re.compile("..</span> <a class=.+? href='(.+?)'> Next+").findall(link) if len(np) > 0: next_page = np[0] if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]', next_page, 'zmovieIndex', artwork + '/main/next.png') for url, name, thumbnail in match: head, sep, tail = name.partition(')') name = head[:-5] year = head[-5:] + sep try: main.addMDir(name, url, 'zmovieVideoLinks', thumbnail, year, False) except: continue if len(np) > 0: if settings.getSetting('nextpagebottom') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]', next_page, 'zmovieIndex', artwork + '/main/next.png') main.AUTOVIEW('movies')
def VIDEOLINKS(name, url, thumb): link = net.http_GET(url).content match1 = re.compile('data-id="(.*?)".*?Watch\sit\son\s+(.*?)"', re.S).findall(link) for url, hoster in match1: url = "%s/en/out/%s" % (base_url, url) main.addDir(hoster, url, 'pornhivePlayLinks', thumb)
def INDEXEPS(url,name): np_url = '' thumb = '' show_name = name link = net.http_GET(url).content match=re.compile('<a href="(.+?)" rel=".+?" title=".+?">\n(.+?)\n</a>').findall(link) np=re.compile('</a></li><li><a href="(.+?)" class="next">').findall(link) if show_name == 'Next Page': real_show=re.compile('Episodes Available for: ‘(.+?)’').findall(link) if len(real_show) > 0: show_name = real_show[0] if len(np) > 0: np_url = np[0] if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',np_url,'watchSeriesOnlineEpisodesIndex',artwork + '/main/next.png') for url,name in match: name = re.sub('×','X',name) try: main.addEDir(name,url,'watchSeriesOnlineVideoLinks',thumb,show_name) except: continue if len(np) > 0: if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]',np_url,'watchSeriesOnlineEpisodesIndex',artwork + '/main/next.png') main.AUTOVIEW('episodes')
def SEARCHTV(url = ''): encode = main.updateSearchFile(url,'TV') if not encode: return False surl=base_url + 'index.php?search=' + encode + '&tv=&x=0&y=0' link=main.OPENURL(surl) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match = re.findall('<a href="([^"]*)"><img alt="[^"]*" src="([^"]*)" /></a><div class="title"><a title="[^"]*" href="[^"]*">([^"]*)</a></div><ul class=\'star-rating\'><li class="current-rating" style="[^"]*"></li></ul><div class="item-genres"><a href="[^"]*">([^"]*)</a>',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,thumb,name,genre in match: name=name.replace('-','').replace('&','').replace('acute;','').strip() main.addDir(name+'[COLOR blue] Genre: '+genre+'[/COLOR]',base_url+url,12,'','') 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 nextpage=re.compile('<a href="([^"]*)" class="next">Next »</a>').findall(link) for url in nextpage: main.addDir('Next Page >>',base_url+url,1,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Movies') main.VIEWS()
def ADULTGENRE(url): link = main.ADULT_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace(''', "'") match = re.findall( '<a href="([^"]*)"><img alt="[^"]*" src="([^"]*)" /></a><div class="title"><a title="[^"]*" href="[^"]*">([^"]*)</a>', link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Shows list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Shows loaded :: [B]' + str(loadedLinks) + ' / ' + str( totalLinks) + '[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]', remaining_display) for url, thumb, name in match: url = base_url + url main.addInfo(name, url, 40, thumb, '', '') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100) / totalLinks remaining_display = 'Shows 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 pagenext = re.compile( '<a href="([^"]*)" class="next">Next »</a>').findall(link) if pagenext: url = 'http://megabox.li/index.php' + pagenext[0] main.addDir('[COLOR red]Next Page ->[/COLOR]', url, 17, art + '/next.jpg')
def TVTags(url,name): ################# TV A-Z List ################# link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','') match = re.findall('<li><a href="/tv/tvtag/([^"]*)">([^"]*)</a></li>',link) for url,name in match: url = 'http://www.thedarewall.com/tv/tvtag/' + url main.addDir(name,url,3,'')
def EPISODES(url): req = urllib2.Request(url) req.add_header( 'User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3' ) response = urllib2.urlopen(req) link = response.read() response.close() match = re.compile( '<a href="(.+?)" rel="bookmark" title=".+?">(.+?)</a>').findall(link) np = re.compile( '<span class="prev"><a href="(.+?)" >Previous Posts</a>').findall(link) if len(np) > 0: next_page = str(np[0]) main.addDir('Next Page', next_page, 'channelCutEpisodes', artwork + 'main/next.png') for url, name in match: name = re.sub(' Episode ', 'x', name) show, sep, numbers = name.partition('Season') name = show + '' + numbers name = name.replace("’", "") try: main.addEDir(name, url, 'channelCutVideoLinks', '', show) except: continue main.AUTOVIEW('episodes')
def TVINDEX (url): try: link = net.http_GET(url).content match=re.compile('<img src="(.+?)" class=".+?" alt=".+?"/></a><div class=".+?"><a href="(.+?)" title="(.+?)">(.+?)</a>').findall(link) if len(match) > 0: for sitethumb,url,movie_name,fullyear in match: inc = 0 #movie_name = fullyear[:-6] year = fullyear[-6:] #movie_name = movie_name.decode('UTF-8','ignore') data = main.GRABTVMETA(movie_name,year) thumb = data['cover_url'] yeargrab = data['year'] year = str(yeargrab) favtype = 'tvshow' addMERDBDir(movie_name +'('+ year +')',basetv_url + url,'episodes',thumb,data,favtype) #main.addSDir(movie_name +'('+ year +')',basetv_url + url,'episodes',thumb,year,favtype) nmatch=re.compile('<span class="currentpage">.+?</span></li><li><a href="(.+?)">(.+?)</a></li><li>').findall(link) if len(nmatch) > 0: for pageurl,pageno in nmatch: main.addDir('Page'+ pageno,basetvshow_url + pageurl,'tvindex',artwork +'nextpage.jpg','','dir') main.AUTO_VIEW('tvshow') except Exception: buggalo.onExceptionRaised()
def SEARCHSHOW(url): if settings.getSetting('tmovies_account') == 'true': net.set_cookies(cookiejar) link = OPEN_URL(url) match=re.compile('<a href="(.+?)">\r\n <img src=".+?" data-original="(.+?)" class=".+?" style=".+?" border=".+?" height=".+?" width=".+?" alt="Watch (.+?) Online for Free">\r\n').findall(link) if len(match) > 0: print "I AM LOOKING" for url,sitethumb,name in match: matchyear=re.compile('<a class="filmyar" href=".+?">(.+?)</a>').findall(link) if len(matchyear) > 0: for year in matchyear: try: data = main.GRABMETA(name,year) thumb = data['cover_url'] yeargrab = data['year'] year = str(yeargrab) except: data = '' thumb = sitethumb year = year favtype = 'movie' if 'watch_movie' in url: try: main.addDir(name+ ' (' + year +')',url,'episodes',thumb,data,favtype,len(url)) except: pass nmatch=re.compile('<a id="next" class=".+?" href="(.+?)">Next »</a>\n').findall(link) if len(nmatch) > 0: main.addDir('Next Page',(nmatch[0]),'searchshow',artwork +'Icon_Menu_Movies_nextpage.png','','dir',1) main.AUTO_VIEW('movies')
def SearchResults(url): link=main.OPEN_URL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\xa6','...').replace('–','-').replace('#038;','').replace(''',"'") match = re.findall('class="view_img">.+?<a href="([^"]*?)" class="spec-border-ie" title="">.+?<img class="img-preview spec-border show-thumbnail" src="http://www.thedarehub.com/tv/templates/svarog/timthumb.php[?]src=([^"]*?)&w=130&h=190&zc=1" alt=" " />.+?<h5>.+?<a class="link" href=".+?" title=".+?">([^"]*?)</a>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait while Search is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Search Results loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) for url,thumb,name in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-').replace(''',"'") main.addDirTE(name,url,7,thumb,'','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Search Results 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 nextpage=re.compile("<a href='([^>]+)' class='nextpostslink'>></a>").findall(link) for url in nextpage: name = '[COLOR green] Next Page -> [/COLOR]' main.addDir(name,url,220,'')
def INDEX(url): next_page = '' link = net.http_GET(url).content match = re.compile( '<a href=\'(.+?)\'>\r\n\t\t<img class=\'movie_img\' src=\'(.+?)\' alt=\'(.+?)\' />' ).findall(link) np = re.compile( 'class="pagination_next"><a class="pagination_link" href="(.+?)"></a></span>' ).findall(link) if len(np) > 0: np_url = np[0] next_page = base_url + np_url if settings.getSetting('nextpagetop') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]', next_page, 'fmaIndex', artwork + '/main/next.png') for url, thumbnail, name in match: url = base_url + url try: main.addMDir(name, url, 'fmaVideoLinks', thumbnail, '', False) except: continue if len(np) > 0: if settings.getSetting('nextpagebottom') == 'true': main.addDir('[COLOR blue]Next Page[/COLOR]', next_page, 'fmaIndex', artwork + '/main/next.png') main.AUTOVIEW('movies')
def TVIndex3(url,name): ################# TV Genre Index ################# link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match = re.findall('<div class="view_img">.+?<a href="([^"]*?)" class="spec-border-ie" title="">.+?<img class="img-preview spec-border show-thumbnail" src="([^"]*?)" alt=.+?class="link" href=".+?" title=".+?">([^"]*?)</a>',link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Show list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Tv Episodes loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]',remaining_display) for url,thumb,name in match: name=name.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('\\','').replace('\xe2\x80\x99',"'").replace('\xe2\x80\x93','-').replace('\xe2\x80\x94','').replace('&-','-') #main.addInfo(name,url,7,thumb,'','') main.addDirTE(name,url,7,thumb,'','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Tv Episodes 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 nextpage=re.compile('<a href="([^"]*?)">»</a></li> </ul> </div> <form method="post"').findall(link) for url in nextpage: main.addDir('[COLOR blue]Next Page -> [/COLOR]',url,5,art+'/next.png') xbmcplugin.setContent(int(sys.argv[1]), 'Tv-Shows')
def Archive(url): link = main.OPENURL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('\\', '').replace('\xe2\x80\x99', "'").replace( '\xe2\x80\x93', '-').replace('\xe2\x80\x94', '').replace('&-', '-') match = re.findall( '<li><a href=\'([^>]+)\' title=\'[^>]+\'>([^>]+)</a></li>', link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Archives is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Archives 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 = name.replace('\r', '').replace('\n', '').replace( '\t', '').replace(' ', '').replace('\\', '').replace( '\xe2\x80\x99', "'").replace('\xe2\x80\x93', '-').replace('\xe2\x80\x94', '').replace('&-', '-') main.addDir(name, url, 1, '') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100) / totalLinks remaining_display = 'Archives 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