def VIKIGENREM(murl): if murl == 'genre': html = main.OPENURL('http://www.viki.com/movies/browse') link=main.unescapes(html).decode('ascii', 'ignore') match = re.findall('(?sim)<li title=""><a class="" href="(/movies/browse.?genre=[^"]+)">([^<]+)</a></li>',link.replace(' ','')) for url, name in match: main.addDir(name,MainUrl+url,483,art+'/dramania.png') elif murl == 'country': html = main.OPENURL('http://www.viki.com/movies/browse') link=main.unescapes(html).decode('ascii', 'ignore') match = re.findall('(?sim)<li title=""><a class="" href="(/movies/browse.?country=[^"]+)">([^<]+)</a></li>',link.replace(' ','')) for url, name in match: main.addDir(name,MainUrl+url,483,art+'/dramania.png') elif murl == 'genreT': html = main.OPENURL('http://www.viki.com/tv/browse') link=main.unescapes(html).decode('ascii', 'ignore') match = re.findall('(?sim)<li title=""><a class="" href="(/tv/browse.?genre=[^"]+)">([^<]+)</a></li>',link.replace(' ','')) for url, name in match: main.addDir(name,MainUrl+url,480,art+'/dramania.png') elif murl == 'countryT': html = main.OPENURL('http://www.viki.com/tv/browse') link=main.unescapes(html).decode('ascii', 'ignore') match = re.findall('(?sim)<li title=""><a class="" href="(/tv/browse.?country=[^"]+)">([^<]+)</a></li>',link.replace(' ','')) for url, name in match: main.addDir(name,MainUrl+url,480,art+'/dramania.png')
def LINK(mname,murl,thumb): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Video,4000)") ok= True link=main.OPENURL(murl) link=main.unescapes(link) r = re.findall('player.releaseURL = "(.+?)";',link) if r: print r try: link=main.OPENURL(r[0]) link=main.unescapes(link) except: xbmc.executebuiltin("XBMC.Notification(Sorry!,No Link Found,3000)") link='' match = re.findall('<video src="(.+?)" title=.+?abstract="(.+?)"',link) for vurl,desc in match: flv = re.findall('flv',vurl) if flv: vid='rtmp://cp74847.edgefcs.net/ondemand/'+vurl else: vid=vurl stream_url=vid infoL={ "Title": mname, "Plot": desc} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='') #WatchHistory main.GA("GolfChannel","Watched") if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]GolfChannel[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok else: xbmc.executebuiltin("XBMC.Notification(Sorry!,No Link Found,3000)") return ok
def LIST(type): path=os.path.join(profile,type.replace('25','')+'_lite.json') f = open(path) field=json.loads(f.read()) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Content list is cached.') if '25movies'in type: totalLinks = 25 else: totalLinks = len(field) loadedLinks = 0 remaining_display = 'Content Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display) xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)") field = sorted(field,key=lambda x:x['poster'],reverse=True) try: updates = '' if 'movies'in type or '25movies'in type: path = os.path.join(profile,'news_movies.json') else: path = os.path.join(profile,'news_tv.json') updates = open(path).read() field = sorted(field,key=lambda word: negtopos(updates.find('"id":'+word['id']+','))) except: pass if '25movies'in type: field=field[0:25] for data in field: #genre=str(data["genres"]).replace("u'",'').replace("'",'').replace("[",'').replace("]",'') if data['active'] == '1': thumb=str(data["poster"]).replace("\/'",'/') if 'movies'in type or '25movies'in type: main.addDown4(main.unescapes(str(data["title"].encode('utf-8')))+' ('+str(data["year"])+')',apibase+'/api/serials/get_movie_data?id='+str(data["id"]),279,thumb,'','','','','') elif 'music' in type: main.addDirMs(main.unescapes(str(data["title"].encode('utf-8'))),apibase+'/api/serials/get_artist_data/?id='+str(data["id"])+'&type=1',302,thumb,'','','','','') else: main.addDirT(main.unescapes(str(data["title"].encode('utf-8'))),data["id"]+'xoxe'+data["seasons"],280,thumb,'','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Content Cached :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(percent,'[B]Will load instantly from now on[/B]',remaining_display) if dialogWait.iscanceled(): break main.VIEWS()
def LIST3(murl): link=main.OPENURL(murl) link=main.unescapes(link) match = re.compile("""<a title="([^<]+)" target="" rel=".+? href="(.+?)"><img src=".+?onerror=".+?altVideoThumbnail.?this, '(.+?)'.?"></a>.+?<p class="ez-desc">(.+?)</p>""").findall(link) for name,url,thumb,desc in match: thumb=thumb.replace(' ','%20') main.addPlayMs(name,url,220,thumb,desc,'','','','') paginate = re.compile("""href="javascript:window.location='(.+?)';" class=".+?">Next</a><a title=".+?" rel=".+?" onclick=".+?""").findall(link) if len(paginate)>0: paginates=main.unescapes(paginate[0]) main.addDir('Next',paginates,221,art+'/next2.png')
def LINK(mname, murl, thumb): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Playing Video,4000)") ok = True link = main.OPENURL(murl) link = main.unescapes(link) r = re.findall('player.releaseURL = "(.+?)";', link) if r: print r try: link = main.OPENURL(r[0]) link = main.unescapes(link) except: xbmc.executebuiltin("XBMC.Notification(Sorry!,No Link Found,3000)") link = '' match = re.findall('<video src="(.+?)" title=.+?abstract="(.+?)"', link) for vurl, desc in match: flv = re.findall('flv', vurl) if flv: vid = 'rtmp://cp74847.edgefcs.net/ondemand/' + vurl else: vid = vurl stream_url = vid infoL = {"Title": mname, "Plot": desc} # play with bookmark player = playbackengine.PlayWithoutQueueSupport( resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname, season='', episode='', year='', img=thumb, infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams, imdb_id='') #WatchHistory main.GA("GolfChannel", "Watched") if selfAddon.getSetting("whistory") == "true": wh.add_item(mname + ' ' + '[COLOR green]GolfChannel[/COLOR]', sys.argv[0] + sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok else: xbmc.executebuiltin("XBMC.Notification(Sorry!,No Link Found,3000)") return ok
def AZLIST(mname,murl): if mname=='#': link=main.OPENURL(murl) link=main.unescapes(link) match = re.compile('<li><a href="([^<]+)">(.+?)</a></li>').findall(link) for url, name in match[0:10]: main.addDirT(name,'http://www.animefreak.tv/'+url,626,'','','','','','') else: link=main.OPENURL(murl) link=main.unescapes(link) match = re.compile('<li><a href="([^<]+)">(.+?)</a></li>').findall(link) for url, name in match: if name[0]==mname or name[0]==mname.lower(): main.addDirT(name,'http://www.animefreak.tv/'+url,626,'','','','','','')
def SEARCHNEW(mname,murl): if murl == 'movieNEW': encode = main.updateSearchFile(mname,'Movies','Search') if not encode: return False surl='http://myvideolinks.me/?s='+encode link=main.OPENURL(surl) link=main.unescapes(link) match=re.compile(pattern).findall(link) if match: for url,thumb,name in match: name=main.CleanTitle(name) if not re.findall('HDTV',name): main.addDirM(name,url,35,thumb,'','','','','') elif murl == 'tvNEW': encode = main.updateSearchFile(mname,'TV','Search') if not encode: return False surl='http://tv.myvideolinks.eu/?s='+encode link=main.OPENURL(surl) link=main.unescapes(link) match=re.compile(pattern).findall(link) if match: for url,thumb,name in match: name=main.CleanTitle(name) main.addDirTE(name,url,35,thumb,'','','','','') else: if murl == 'tNEW': encode = mname.replace(' ','+') surl='http://tv.myvideolinks.eu/?s='+encode link=main.OPENURL(surl) link=main.unescapes(link) match=re.compile(pattern).findall(link) if match: for url,thumb,name in match: name=main.CleanTitle(name) main.addDirTE(name,url,35,thumb,'','','','','') elif murl == 'mNEW': encode = mname.replace(' ','+') surl='http://myvideolinks.me/?s='+encode link=main.OPENURL(surl) link=main.unescapes(link) match=re.compile(pattern).findall(link) if match: for url,thumb,name in match: name=main.CleanTitle(name) if not re.findall('HDTV',name): main.addDirM(name,url,35,thumb,'','','','','') main.GA("Newmyvideolinks","Search")
def SEARCHNEW(mname, murl): if murl == 'movieNEW': encode = main.updateSearchFile(mname, 'Movies', 'Search') if not encode: return False surl = 'http://myvideolinks.me/?s=' + encode link = main.OPENURL(surl) link = main.unescapes(link) match = re.compile(pattern).findall(link) if match: for url, thumb, name in match: name = main.CleanTitle(name) if not re.findall('HDTV', name): main.addDirM(name, url, 35, thumb, '', '', '', '', '') elif murl == 'tvNEW': encode = main.updateSearchFile(mname, 'TV', 'Search') if not encode: return False surl = 'http://tv.myvideolinks.eu/?s=' + encode link = main.OPENURL(surl) link = main.unescapes(link) match = re.compile(pattern).findall(link) if match: for url, thumb, name in match: name = main.CleanTitle(name) main.addDirTE(name, url, 35, thumb, '', '', '', '', '') else: if murl == 'tNEW': encode = mname.replace(' ', '+') surl = 'http://tv.myvideolinks.eu/?s=' + encode link = main.OPENURL(surl) link = main.unescapes(link) match = re.compile(pattern).findall(link) if match: for url, thumb, name in match: name = main.CleanTitle(name) main.addDirTE(name, url, 35, thumb, '', '', '', '', '') elif murl == 'mNEW': encode = mname.replace(' ', '+') surl = 'http://myvideolinks.me/?s=' + encode link = main.OPENURL(surl) link = main.unescapes(link) match = re.compile(pattern).findall(link) if match: for url, thumb, name in match: name = main.CleanTitle(name) if not re.findall('HDTV', name): main.addDirM(name, url, 35, thumb, '', '', '', '', '') main.GA("Newmyvideolinks", "Search")
def LISTMov(murl): link = aflamOPENURL(murl) link = link.replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "").replace("»", "") match = re.compile("""<a href="([^"]+)"><img src="([^"]+)" class=".+?alt="([^"]+)" />""", re.DOTALL).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 in match: name = main.unescapes(name) main.addPlayM(name, url, 338, 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="nextpostslink" href="([^"]+)">»</a>""").findall(link) if len(paginate) > 0: main.addDir("Next", paginate[0], 341, art + "/next2.png") main.GA("Aflam1", "List")
def LISTINT(name,url): main.addDir('Search','TV',419,art+'/search.png') urllist=[] page = 1 while page < 15 : urllist.append('http://www.einthusan.com/movies/index.php?lang=hindi&organize=Activity&filtered=RecentlyPosted&org_type=Activity&page='+str(page)) page += 1 if urllist: html = main.batchOPENURL(urllist) urllist=main.unescapes(html) match = re.compile('<a class="movie-cover-wrapper" href="(.+?)"><img src="(.+?)" alt="(.+?)"').findall(urllist) 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 in match: url=url.replace('../movies/','') thumb=thumb.replace('../movies/','') name = name.replace('hindi movie online','') main.addPlayM(name,MainUrl+url,38,MainUrl+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 main.GA("INT","Einthusan")
def LINKLIST(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]", '', '') match = re.compile( '<span class="(.+?)">.+?</span></td><td class="tdcalidad">(.+?)</td><td class=".+?<img src=".+?" alt="(.+?)" />.+?</td>.+?title=".+?" href="(.+?)">', re.DOTALL).findall(link) for lang, qua, host, url in match: if 'flag flag_0' in lang: lang = ' [COLOR red]ESP[/COLOR]' if 'flag flag_1' in lang: lang = ' [COLOR yellow]LAT[/COLOR]' if 'flag flag_2' in lang: lang = ' [COLOR purple]ENG[/COLOR]' if 'flag flag_3' in lang: lang = ' [COLOR green]SUB[/COLOR]' if main.supportedHost(host): mname = main.removeColoredText(mname) main.addDown2( mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]' + lang + ' [COLOR aqua]' + qua + '[/COLOR]', url, 67, art + '/hosts/' + host.lower() + ".png", art + '/hosts/' + host.lower() + ".png")
def iWatchLINK(mname, url): link = main.OPENURL(url) movie_content = main.unescapes(link) movie_content = re.sub("\\\"", "\"", movie_content) movie_content = movie_content.replace('\'', '') from resources.universal import _common as univ_common link2 = univ_common.str_conv(decode(movie_content)) if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink( "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", '', '') links = re.search('<tbody>(.+?)</tbody>', link2) if links: links = links.group(1) print links match = re.compile( '<a href="([^"]+?)" target="_blank" rel="nofollow"><img src=".+?> ([^<]+?)</td> <td><img src=".+?</td> <td>.+?</td> <td>([^<]+?)</td>', re.DOTALL).findall(links) for url, name, qua in match: name = name.replace(' ', '') if name[0:1] == '.': name = name[1:] name = name.split('.')[0] if main.supportedHost(name.lower()): main.addDown2( mname + ' [COLOR red](' + qua + ')[/COLOR]' + ' [COLOR blue]' + name.upper() + '[/COLOR]', url, 649, art + '/hosts/' + name.lower() + '.png', art + '/hosts/' + name.lower() + '.png')
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()
def SEARCHM(murl,index=False): encode = main.updateSearchFile(murl,'Movies') if not encode: return False search_url = 'http://www.iwatchonline.to/search' from t0mm0.common.net import Net as net search_content = net().http_POST(search_url, { 'searchquery' : encode, 'searchin' : 'm'} ).content.encode('utf-8') r = re.findall('(?s)<table(.+?)</table>',search_content) r=main.unescapes(r[0]) match=re.compile('<img.+?src=\"(.+?)\".+?<a.+?href=\"(.+?)\">(.+?)</a>').findall(r) 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) xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)") for thumb,url,name in match: if index == 'True': main.addDirM(name,url,21,thumb,'','','','','') else: main.addDirM(name,url,588,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 main.GA("iWatchonline","Search")
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')
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()
def NovaWeed(murl): link = main.OPENURL(murl) link = main.unescapes(link) vw = re.compile('flashvars.advURL="(.+?)";').findall(link) vid_url = vw[0] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") return main.resolve_url(vid_url)
def LAST_AIRED(url): html = main.OPENURL2(url) if html == None: return r = re.findall(r'Last Aired TV Shows/Episodes</div>(.+?)«Browse all latest TV Episodes»',html, re.M|re.DOTALL)[0] pattern = 'href="/(player.+?)">' r = re.findall(r''+pattern+'', r, re.M|re.DOTALL) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until list is cached.') totalLinks = len(r) loadedLinks = 0 remaining_display = 'Media loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display) for url in r: r = re.findall(r'player/\d+/(.+?)/season_(\d+)/episode_(\d+)/.+?/',url)#.replace('_', ' ') for name, season, episode in r: if len(season) == 1: season = "0" + season if len(episode) == 1: episode = "0" + episode name = name.replace('_', ' ') if ':' in name: name = re.findall('(.+?)\:', name)[0] name = name.strip()+' S'+season+'E'+episode name = main.unescapes(name) main.addDirTE(name.replace('.',''),url,1026,'','','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Media 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()
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('<h4>(.+?)</h4>(.+?)</ul>').findall(link) if not match0: match0 = re.compile( 'title="[^"]+?">([^"]+?)</a>.+?</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(mname + ' [COLOR blue]' + name + '[/COLOR]', murl, 209, art + '/hosts/' + thumb + ".png", art + '/hosts/' + thumb + ".png")
def LISTTV4(murl): xbmc.executebuiltin("XBMC.Notification(Please Wait!,Collecting Source Data,10000)") main.addDir('Search Rlsmix','rlsmix',136,art+'/search.png') urllist=main.OPENURL('http://www.rlsmix.net/category/tv-shows/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/2/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/3/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/4/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/5/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/6/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/7/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/8/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/9/')+main.OPENURL('http://www.rlsmix.net/category/tv-shows/page/10/') if urllist: urllist=main.unescapes(urllist) match=re.compile('<h1 class="titles"><a href="(.+?)" title="Permanent Link to (.+?)">.+?src="http://uppix.net/(.+?)"').findall(urllist) 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 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.addDirTE(name,url,62,'http://uppix.net/'+thumb,'','','','','') 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 main.GA("TV","Rlsmix")
def NewRelease(url): link=main.OPEN_URL(url) link=main.unescapes(link) match=re.compile('data-placement=.+?title=".+?href="([^"]*?)"><img src="([^"]*?)" alt="([^"]*?)"><div class="well-sx text-center">([^"]*?)<br>([^"]*?)</div></a></div>').findall(link) if match: 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 url,thumb,epname,name,epinfo in match: main.addDirTE(name+' -'+epinfo+' '+epname,url,5,thumb,'','','','','') 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('<a href="(http://couchtuner.at/page/[^"]*?)">></a></li>').findall(link) for xurl in paginate: main.addDir('[COLOR blue]Next Page >'+'[/COLOR]',xurl,1,art+'/next2.png','')
def LINKLIST(mname, url): link = main.OPENURL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( '<iframe src="//www.facebook.com/plugins/likebox.php', '').replace('<iframe src="http://creative.rev2pub.com', '') link = main.unescapes(link) if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink( "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", '', '') match = re.compile('<center><iframe.+?src="(.+?)".+?', re.DOTALL | re.IGNORECASE).findall(link) #main.ErrorReport(match) for url in match: hostn = re.compile("http://(.+?)/.+?").findall(url) for hname in hostn: host = hname.replace('www.', '').replace('embed.', '').replace( '.es', '').replace('.in', '').replace('.sx', '').replace( '.net', '').replace('.com', '').replace('.to', '').replace( '.org', '').replace('.ch', '').replace('.eu', '').replace('.ES', '') host = host.split('.')[0] if main.supportedHost(host): mname = main.removeColoredText(mname) main.addDown2(mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]', url, 797, art + '/hosts/' + host.lower() + ".png", art + '/hosts/' + host.lower() + ".png")
def superSearch(encode,type): try: if type=='Movies': type='m' else: type='t' returnList=[] search_url = 'http://www.iwatchonline.to/search' from t0mm0.common.net import Net as net encodewithoutepi = urllib.quote(re.sub('(?i)(\ss(\d+)e(\d+))|(Season(.+?)Episode)|(\d+)x(\d+)','',urllib.unquote(encode)).strip()) search_content = net().http_POST(search_url, { 'searchquery' : encodewithoutepi, 'searchin' : type} ).content.encode('utf-8') r = re.findall('(?s)<table(.+?)</table>',search_content) r=main.unescapes(r[0]) epi = re.search('(?i)s(\d+?)e(\d+?)$',encode) if epi: epistring = encode.rpartition('%20')[2].upper() match=re.compile('<img.+?src=\"(.+?)\".+?<a.+?href=\"(.+?)\">(.+?)</a>').findall(r) for thumb,url,name in match: if type=='m': returnList.append((name,prettyName,url,thumb,588,True)) else: if epi: url = url.replace('/tv-shows/','/episode/')+'-'+epistring.lower() name=re.sub('(\d{4})','',name.replace(' (','').replace(')','')) returnList.append((name + ' ' + epistring,prettyName,url,thumb,588,True)) else: returnList.append((name,prettyName,url,thumb,590,True)) return returnList except: return []
def LAST_AIRED(url): html = main.OPENURL2(url) if html == None: return r = re.findall( r"Last Aired TV Shows/Episodes</div>(.+?)«Browse all latest TV Episodes»", html, re.M | re.DOTALL )[0] pattern = 'href="/(player.+?)">' r = re.findall(r"" + pattern + "", r, re.M | re.DOTALL) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create("Please wait until list is cached.") totalLinks = len(r) loadedLinks = 0 remaining_display = "Media loaded :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]." dialogWait.update(0, "[B]Will load instantly from now on[/B]", remaining_display) for url in r: r = re.findall(r"player/\d+/(.+?)/season_(\d+)/episode_(\d+)/.+?/", url) # .replace('_', ' ') for name, season, episode in r: if len(season) == 1: season = "0" + season if len(episode) == 1: episode = "0" + episode name = name.replace("_", " ") if ":" in name: name = re.findall("(.+?)\:", name)[0] name = name.strip() + " S" + season + "E" + episode name = main.unescapes(name) main.addDirTE(name.replace(".", ""), url, 1026, "", "", "", "", "", "") loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100) / totalLinks remaining_display = "Media 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()
def SEARCH(murl): if murl == 's12dnm': keyb = xbmc.Keyboard('', 'Search Documentaries') keyb.doModal() if (keyb.isConfirmed()): search = keyb.getText() encode = urllib.quote(search) surl = 'http://www.documentarywire.com/?s=' + encode else: surl = murl link = main.OPENURL(surl) link = main.unescapes(link) match = re.compile( '<a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>' ).findall(link) for name, url, thumb, desc in match: main.addPlayMs(name, url, 228, thumb, desc, '', '', '', '') paginate = re.compile( """'extend'>...</span><a href=\'(.+?)\' class="next">Next.+?</a>""" ).findall(link) if (len(paginate) == 0): paginate = re.compile( """<div class='wp-pagenavi'>.+?class='page larger'>[^\&]+</a><a href=\'([^\&]+)\' class="next">Next.+?</a>""" ).findall(link) if (len(paginate) > 0): for purl in paginate: main.addDir('[COLOR blue]Next[/COLOR]', purl, 229, art + '/next2.png')
def EPISODES(mname,url,linkback): html = main.OPENURL2(url) r = re.compile(r'parts" id="'+linkback+'"><a name=(.+?)<div id="parts_header">',re.M|re.DOTALL).findall(html) match = re.compile('href=/(.+?'+linkback+'.+?)">(.+?)</a>').findall(str(r)) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Media loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display) season = re.search('Seas(on)?\.? (\d+)',mname,re.I) for url, episode in match: episode = main.unescapes(episode) episode = episode.replace('\\','').replace('xc2x92','') name = mname epi= re.search('Ep(isode)?\.? (\d+)(.*)',episode, re.I) if(epi): e = str(epi.group(2)) if(len(e)==1): e = "0" + e if(season): s = season.group(2) if(len(s)==1): s = "0" + s name = re.sub(' ?Seas(on)?\.? (\d+)','',name,re.I) name = name + " " + "S" + s + "E" + e episode = epi.group(3).strip(" -") main.addDirTE(name+' '+"[COLOR red]" + episode + '[/COLOR]',url,1026,'','','','','','') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100)/totalLinks remaining_display = 'Media 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()
def LIST(murl): main.GA("DocumentaryWire", "List") link = main.OPENURL(murl) link = main.unescapes(link) r = re.findall( """<div class="loop-content switchable-view grid-small" data-view="grid-small">(.+?)<div class=\'wp-pagenavi\'>""", link) if r: match = re.compile( '<div class="thumb"><a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>' ).findall(r[0]) else: match = re.compile( '<div class="thumb"><a class=".+?" data-id=".+?" title="(.+?)" href="(.+?)"><span class=".+?"><img src="(.+?)" alt=".+?" />.+?<p class="desc">(.+?)</p>' ).findall(link) for name, url, thumb, desc in match: main.addPlayMs(name, url, 228, thumb, desc, '', '', '', '') paginate = re.compile( """'extend'>...</span><a href=\'(.+?)\' class="next">Next.+?</a>""" ).findall(link) if (len(paginate) == 0): paginate = re.compile( """<div class='wp-pagenavi'>.+?class='page larger'>[^\&]+</a><a href=\'([^\&]+)\' class="next">Next.+?</a>""" ).findall(link) if (len(paginate) > 0): for purl in paginate: main.addDir('[COLOR blue]Next[/COLOR]', purl, 227, art + '/next2.png')
def SEARCHM(murl): encode = main.updateSearchFile(murl, 'Movies') if not encode: return False search_url = 'http://www.iwatchonline.to/search' from t0mm0.common.net import Net as net search_content = net().http_POST(search_url, { 'searchquery': encode, 'searchin': 'm' }).content.encode('utf-8') r = re.findall('(?s)<table(.+?)</table>', search_content) r = main.unescapes(r[0]) match = re.compile( '<img.+?src=\"(.+?)\".+?<a.+?href=\"(.+?)\">(.+?)</a>').findall(r) 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) xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)") for thumb, url, name in match: main.addDirM(name, url, 588, 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 main.GA("iWatchonline", "Search")
def EPISODES(mname, url, linkback): html = main.OPENURL2(url) r = re.compile(r'parts" id="' + linkback + '"><a name=(.+?)<div id="parts_header">', re.M | re.DOTALL).findall(html) match = re.compile("href=/(.+?" + linkback + '.+?)">(.+?)</a>').findall(str(r)) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create("Please wait until list is cached.") totalLinks = len(match) loadedLinks = 0 remaining_display = "Media loaded :: [B]" + str(loadedLinks) + " / " + str(totalLinks) + "[/B]." dialogWait.update(0, "[B]Will load instantly from now on[/B]", remaining_display) season = re.search("Seas(on)?\.? (\d+)", mname, re.I) for url, episode in match: episode = main.unescapes(episode) episode = episode.replace("\\", "").replace("xc2x92", "") name = mname epi = re.search("Ep(isode)?\.? (\d+)(.*)", episode, re.I) if epi: e = str(epi.group(2)) if len(e) == 1: e = "0" + e if season: s = season.group(2) if len(s) == 1: s = "0" + s name = re.sub(" ?Seas(on)?\.? (\d+)", "", name, re.I) name = name + " " + "S" + s + "E" + e episode = epi.group(3).strip(" -") main.addDirTE(name + " " + "[COLOR red]" + episode + "[/COLOR]", url, 1026, "", "", "", "", "", "") loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100) / totalLinks remaining_display = "Media 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()
def LIST2(mname,murl,thumb,desc): main.GA("AnimeFreak","List") link=main.OPENURL(murl) link=main.unescapes(link) match = re.compile("""onClick="javascript:loadParts.?\'(.+?)', \'\'.?" class="multi">(.+?)</a>""").findall(link) if len(match)==0: match = re.compile('<iframe .+?src="(.+?)".+?/iframe>').findall(link) for url in match: host=re.compile("http://(.+?).?/.+?").findall(url) for hname in host: name=hname.replace('www.','').replace('embed.','').replace('.co','').replace('.t','').replace('.e','') main.addPlayc(mname+' [COLOR red]'+name+'[/COLOR]',url,627,thumb,desc,'','','','') else: for url, name in match: match2 = re.compile('<iframe(.+?)/iframe>').findall(url) if len(match2)>=2: for url in match2: match = re.compile('src="(.+?)"').findall(url) if len(match)==0: match = re.compile("src='(.+?)'").findall(url) for url in match: host=re.compile("http://(.+?).?/.+?").findall(url) for hname in host: name=hname.replace('www.','').replace('embed.','').replace('.co','').replace('.t','').replace('.e','') main.addPlayc(mname+' [COLOR red]'+name+'[/COLOR]',url,627,thumb,desc,'','','','') main.addPlayc(mname+' [COLOR red]'+name+'[/COLOR]',url,627,thumb,desc,'','','','')
def LISTTV4(murl): xbmc.executebuiltin( "XBMC.Notification(Please Wait!,Collecting Source Data,10000)") main.addDir('Search Rlsmix', 'rlsmix', 136, art + '/search.png') urllist = main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/') + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/2/') + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/3/' ) + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/4/' ) + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/5/' ) + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/6/' ) + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/7/' ) + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/8/' ) + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/9/' ) + main.OPENURL( 'http://www.rlsmix.net/category/tv-shows/page/10/') if urllist: urllist = main.unescapes(urllist) match = re.compile( '<h1 class="titles"><a href="(.+?)" title="Permanent Link to (.+?)">.+?src="http://uppix.net/(.+?)"' ).findall(urllist) 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 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.addDirTE(name, url, 62, 'http://uppix.net/' + thumb, '', '', '', '', '') 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 main.GA("TV", "Rlsmix")
def LISTMov(murl): link = aflamOPENURL(murl) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('»', '') match = re.compile( """<a href="([^"]+)"><img src="([^"]+)" class=".+?alt="([^"]+)" />""", re.DOTALL).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 in match: name = main.unescapes(name) main.addPlayM(name, url, 338, 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="nextpostslink" href="([^"]+)">»</a>''').findall(link) if len(paginate) > 0: main.addDir('Next', paginate[0], 341, art + '/next2.png') main.GA("Aflam1", "List")
def NovaWeed(murl): link=main.OPENURL(murl) link=main.unescapes(link) vw = re.compile('flashvars.advURL="(.+?)";').findall(link) vid_url=vw[0] xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") return main.resolve_url(vid_url)
def LISTEPISODE(mname, url): link = main.OPENURL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '') link = main.unescapes(link) if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink( "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", '', '') match = re.compile( '<dd><a href="([^<]+)" class="zoombox.+?" title="([^<]+)">', re.DOTALL).findall(link) for url, name in match: hostn = re.compile("http://(.+?)/.+?").findall(url) for hname in hostn: host = hname.replace('www.', '').replace('embed.', '').replace( '.es', '').replace('.in', '').replace('.sx', '').replace( '.net', '').replace('.com', '').replace('.to', '').replace( '.org', '').replace('.ch', '').replace('.eu', '').replace('.ES', '') host = host.split('.')[0] if main.supportedHost(host): mname = main.removeColoredText(mname) main.addDown2(name + ' [COLOR blue]' + host.upper() + ' [/COLOR]', url, 797, art + '/hosts/' + host.lower() + ".png", art + '/hosts/' + host.lower() + ".png")
def LISTMov(murl): link = main.OPENURL(murl) link = link.replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "").replace("»", "") match = re.compile( """<td width=".+?" valign=".+?" style=".+?<a href="([^<]+)"><img src="(.+?)".+?title="(.+?)" alt=".+?".+?</ul>(.+?)</div>""", re.DOTALL, ).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, desc in match: name = main.unescapes(name) main.addPlayM(name, url, 338, thumb, desc, "", "", "", "") 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="xo-pagarrow" href="([^<]+)"><u></u>""").findall(link) if len(paginate) > 0: main.addDir("Next", MAINURL + paginate[0], 341, art + "/next2.png") main.GA("Aflam1", "List")
def LISTSP3(murl): if murl == 'HD': url='http://www.dailyflix.net/index.php?/forum/196-hd-movies-2012-2013/page__sort_key__last_post__sort_by__Z-A' link=main.OPENURL(url) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('&','&') match=re.compile('<a itemprop=".+?" id=".+?" href="([^<]+)" title=.+? class=.+?><span itemprop="name">(.+?)</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, name in match: name=main.unescapes(name) main.addPlayM(name,url,54,'','','','','','') 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-TV","Dailyfix") main.VIEWS()
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()
def LISTFX(): urllist=[] page = 1 while page < 11 : urllist.append('http://estrenosvk.com/ano/2014/'+str(page)+'/') page += 1 if urllist: html = main.batchOPENURL(urllist) urllist=main.unescapes(html) match=re.compile('<a href="([^"]+)"><figure><img src="([^"]+)" alt="([^"]+)">',re.DOTALL).findall(urllist) 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 in match: name=name.decode('latin-1') name=name.encode('utf-8') main.addPlayM(name,'http://estrenosvk.com/'+url,309,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
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")
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)")
def SEARCHVIKI(): dialog = xbmcgui.Dialog() ret = dialog.select('[COLOR=FF67cc33][B]Choose A Search Type[/COLOR][/B]',['[B][COLOR=FF67cc33]TV Shows[/COLOR][/B]','[B][COLOR=FF67cc33]Movies[/COLOR][/B]']) if ret == -1: return if ret==0: keyb = xbmc.Keyboard('', 'Search For Shows') else: keyb = xbmc.Keyboard('', 'Search For Movies') keyb.doModal() if (keyb.isConfirmed()): search = keyb.getText() encode=urllib.quote(search) if ret==0: surl='http://www.viki.com/search?q='+encode+'&type=series' else: surl='http://www.viki.com/search?q='+encode+'&type=film' html = main.OPENURL(surl) link=main.unescapes(html).decode('ascii', 'ignore') match = re.findall('(?sim)class="thumbnail pull-left"><img alt=".+?src="([^"]+)".+?<a href="([^"]+)">([^<]+)</a>.+?<p>(.+?)...',link.replace(' ','')) for thumb,url,name,desc in match: fan=re.findall('(.+?jpg)',thumb) if fan: fanart=fan[0] else: fanart='' if ret==0: main.addDirT(name,MainUrl+url,481,thumb,desc,fanart,'','','') else: main.addPlayc(name,url,482,thumb,desc,fanart,'','','')
def LISTSP(murl): #urllist=main.OPENURL('http://oneclickwatch.org/category/movies/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/2/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/3/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/4/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/5/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/6/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/7/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/8/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/9/')+main.OPENURL('http://oneclickwatch.org/category/movies/page/10/') urllist=main.batchOPENURL(('http://oneclickwatch.org/category/movies/','http://oneclickwatch.org/category/movies/page/2/','http://oneclickwatch.org/category/movies/page/3/','http://oneclickwatch.org/category/movies/page/4/','http://oneclickwatch.org/category/movies/page/5/','http://oneclickwatch.org/category/movies/page/6/','http://oneclickwatch.org/category/movies/page/7/','http://oneclickwatch.org/category/movies/page/8/','http://oneclickwatch.org/category/movies/page/9/','http://oneclickwatch.org/category/movies/page/10/')) if urllist: urllist=main.unescapes(urllist) match=re.compile('<a href="([^<]+)" title=".+?".+? src="(.+?)" .+?/><br />(.+?)<br />').findall(urllist) 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 in match: name=name.replace('<strong>','').replace('</strong>','') main.addPlayM(name,url,135,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 main.CloseAllDialogs() main.GA("HD","Oneclickwatch")
def LINKLIST(mname, url): link = main.OPENURL2(url) link = link.replace('<iframe src="http://ads.affbuzzads.com', '') link = main.unescapes(link) if selfAddon.getSetting("hide-download-instructions") != "true": main.addLink( "[COLOR red]For Download Options, Bring up Context Menu Over Selected Link.[/COLOR]", '', '') match = re.compile('<iframe src="(.+?)" frameborder', re.DOTALL).findall(link) for url in match: hostn = re.compile("http://(.+?)/.+?").findall(url) for hname in hostn: host = hname.replace('www.', '').replace('embed.', '').replace( '.es', '').replace('.in', '').replace('.sx', '').replace( '.net', '').replace('.com', '').replace('.to', '').replace( '.org', '').replace('.ch', '').replace('.eu', '').replace('.ES', '') host = host.split('.')[0] if main.supportedHost(host): mname = main.removeColoredText(mname) main.addDown2(mname + ' [COLOR blue]' + host.upper() + ' [/COLOR]', url, 314, art + '/hosts/' + host.lower() + ".png", art + '/hosts/' + host.lower() + ".png")
def LINK(mname,murl,thumb,desc): link=main.OPENURL(murl) link=main.unescapes(link) ok=True try: match=re.compile('src="http://www.youtube.com/embed/(.+?).?autoplay=1&cc_load_policy=0.+?"').findall(link) if match: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,3000)") stream_url = "plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid="+match[0]+"&hd=1" match2=re.compile('src="http://player.vimeo.com/video/(.+?)"').findall(link) if match2: xbmc.executebuiltin("XBMC.Notification(Please Wait!,Resolving Link,3000)") stream_url = main.resolve_url(str('http://vimeo.com/'+match2[0])) if(stream_url == False): xbmc.executebuiltin("XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)") return infoL={'Title': mname, 'Plot': desc} # play with bookmark player = playbackengine.PlayWithoutQueueSupport(resolved_url=stream_url, addon_id=addon_id, video_type='', title=mname,season='', episode='', year='',img=thumb,infolabels=infoL, watchedCallbackwithParams=main.WatchedCallbackwithParams,imdb_id='') #WatchHistory if selfAddon.getSetting("whistory") == "true": wh.add_item(mname+' '+'[COLOR green]Doc-Wire[/COLOR]', sys.argv[0]+sys.argv[2], infolabels='', img=thumb, fanart='', is_folder=False) player.KeepAlive() return ok except Exception, e: if stream_url != False: main.ErrorReport(e) else: xbmc.executebuiltin("XBMC.Notification(Sorry!,Link deleted Or unplayable,5000)") return ok
def LISTINT(murl): html = main.OPENURL(murl) link=main.unescapes(html) match = re.compile('<a class="movie-cover-wrapper" href="(.+?)"><img src="(.+?)" alt="(.+?)"').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 in match: url=url.replace('../movies/','') thumb=thumb.replace('../movies/','') name = name.replace('movie online','').replace('tamil','').replace('hindi','').replace('telugu','').replace('malayalam','') main.addPlayM(name,MainMovie+url,38,MainMovie+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="numerical-nav-selected" href=".+?">.+?</a><a href="([^<]+)">.+?</a>').findall(link) if len(paginate)>0: if 'movies' in murl: main.addDir('[COLOR blue]Next Page >>>[/COLOR]',MainUrl+'/movies/index.php'+paginate[0],42,art+'/next2.png') else: main.addDir('[COLOR blue]Next Page >>>[/COLOR]',MainUrl+'/bluray/index.php'+paginate[0],42,art+'/next2.png') main.GA("einthusian","List")
def LISTVIKIT(murl): html = main.OPENURL(murl) link=main.unescapes(html).decode('ascii', 'ignore') match = re.findall('(?sim)class="thumbnail pull-left"><img alt=".+?src="([^"]+)".+?<a href="([^"]+)">([^<]+)</a>.+?<p>(.+?)...',link.replace(' ','')) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Movie 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 thumb,url,name,desc in match: fan=re.findall('(.+?jpg)',thumb) if fan: fanart=fan[0] else: fanart='' main.addDirT(name,MainUrl+url,481,thumb,desc,fanart,'','','') 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("(?sim)<a class='page-link' rel='next' href='([^']+)'>Next →</a>").findall(link) if len(paginate)>0: main.addDir('[COLOR blue]Next Page >>>[/COLOR]',MainUrl+paginate[0],480,art+'/next2.png') main.GA("Viki","List")
def LISTSP3(murl): if murl == 'HD': url = 'http://board.dailyflix.net/index.php?/forum/196-hd-movies-2012-2013/page__sort_key__last_post__sort_by__Z-A' link = main.OPENURL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('&', '&') match = re.compile( '<a itemprop=".+?" id=".+?" href="([^<]+)" title=.+? class=.+?><span itemprop="name">(.+?)</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, name in match: url = url.decode('utf-8').encode('ascii', 'ignore') name = main.unescapes(name) main.addPlayM(name, url, 54, '', '', '', '', '', '') 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-TV", "Dailyfix") main.VIEWS()
def LIST(murl): main.GA("GolfChannel","List") link=main.OPENURL(murl) link=main.unescapes(link) match = re.compile('<div class="field-content"><a href=".+?"><img typeof="foaf:Image" src="([^<]+)" width=".+?" height=".+?" /></a></div> </div> <div class=".+?<a href=".+?">(.+?)</a></span> </div> <div class=".+?<div class="field-content">(.+?)</div> </div> <div class=".+?<li class="views-row views-row-1 views-row-odd views-row-first">(.+?)<div class="clearfix"></div>',re.DOTALL).findall(link) for thumb, name,desc,url in match: thumb=thumb.replace(' ','%20') main.addDirc(name,url,219,thumb,desc,'','','','')
def superSearch(encode,type): try: returnList=[] surl='http://www.filestube.to/query.html?q=1080p+'+encode+'+bluray+-esubs&select=mkv&sizefrom=5000&sizeto=20000&sort=dd' link=main.OPENURL(surl, verbose=False) link=main.unescapes(link) link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','') match=re.compile('(?sim)<a href="([^"]+?)"[^>]*?class="rL"[^>]*?>(.+?)</a>').findall(link) for url, name in match: name = name.replace('<b>','').replace('</b>','') name=main.unescapes(name) url = url.decode('utf-8').encode('ascii', 'ignore') url = 'http://www.filestube.to' + url if not re.search('(?i)(\\bsubs\\b|\\msubs\\b|fetish)',name) and (re.search('(?i)(20\d\d|19\d\d)',name) or re.search('(?i)(blow|sparks)',name) ): returnList.append((name,prettyName,url,'',406,True)) return returnList except: return []
def CATLIST(murl): link = main.OPENURL(murl) link = main.unescapes(link) match = re.compile( '<li class="cat-item cat-item.+?"><a href="(.+?)" title=".+?">(.+?)</a>(.+?)</li>' ).findall(link) for url, name, numb in match: main.addDir(name, url, 227, art + '/docwire.png')
def LISTPOP(murl): link = main.OPENURL(murl) link = main.unescapes(link) match = re.compile( '<div><span><img alt=".+?" src="(.+?)" /></span></div> </td> <td .+?> <h2><a href="(.+?)"><strong>(.+?)</strong></a></h2>' ).findall(link) for thumb, url, name in match: main.addDirT(name, url, 626, thumb, '', '', '', '', '')
def VELO(murl): link=main.OPENURL(murl) link=main.unescapes(link) match= re.compile('<a href="([^<]+)" class="event-click-tracking" data-track-rule="module" data-module-name="other-shows".+?<img src="(.+?)" alt=".+?" title="(.+?)" style=".+?" />').findall(link) for url,thumb,name in sorted(match): thumb=thumb.replace(' ','%20') main.addDir(name,'http://velocity.discovery.com'+url,64,thumb) main.GA("Adventure","Velocity") main.VIEWSB()
def SEARCHM(murl): seapath=os.path.join(main.datapath,'Search') SeaFile=os.path.join(seapath,'SearchHistory25') try: os.makedirs(seapath) except: pass if murl == 'ws': keyb = xbmc.Keyboard('', 'Search For Shows or Episodes') keyb.doModal() if (keyb.isConfirmed()): search = keyb.getText() encode=urllib.quote(search) if not os.path.exists(SeaFile) and encode != '': open(SeaFile,'w').write('search="%s",'%encode) else: if encode != '': open(SeaFile,'a').write('search="%s",'%encode) searchis=re.compile('search="(.+?)",').findall(open(SeaFile,'r').read()) for seahis in reversed(searchis): continue if len(searchis)>=10: searchis.remove(searchis[0]) os.remove(SeaFile) for seahis in searchis: try: open(SeaFile,'a').write('search="%s",'%seahis) except: pass else: encode = murl from t0mm0.common.net import Net net = Net() search_url = 'http://www.freemoviesaddict.com/search' search_content = net.http_POST(search_url, { 'search_term' : encode} ).content r=main.unescapes(search_content) match=re.compile('<img class=\'.+?\' src=\'(.+?)\' alt=\'.+?\' />.+?<a class=\'.+?\' href=\'/(.+?)\'>(.+?)</a>.+?<a href=\'/movies/year/.+?\'>(.+?)</a>.+?<a href=\'/movies/genre/.+?\'>(.+?)</a>.+?</span><span class=".+?">(.+?)</span>').findall(r) 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 thumb,url,name, year, gen, desc in match: main.addPlayM(name,'http://www.freemoviesaddict.com/'+url,569,thumb,desc,'','',gen,year) 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("FMA","Search")
def GENRELIST(murl): link=main.OPENURL(murl) link=main.unescapes(link) match = re.compile('<h2 class="nodeTitle">.+?<a href="(.+?)".+?src="(.+?)" alt="(.+?)" />').findall(link) for url, thumb,name in match: main.addDirT(name,'http://www.animefreak.tv/'+url,626,thumb,'','','','','') paginate = re.compile("""<li class="pager-next"><a href="(.+?)" title=".+?" class="active">.+?</a></li>""").findall(link) if len(paginate)>0: paginates=paginate[0] main.addDir('Next','http://www.animefreak.tv/'+paginates,635,art+'/next2.png')
def LATESTE(mname,murl): link=main.OPENURL(murl) link=main.unescapes(link) match = re.compile('<td class=".+?<a href="(.+?)">(.+?)</a> </td>').findall(link) for url, name in match: main.addDirT(name,'http://www.animefreak.tv/'+url,630,'','','','','','') paginate = re.compile("""<li class="pager-next last"><a href="(.+?)" class="active">.+?</a></li>""").findall(link) if len(paginate)>0: paginates=paginate[0] main.addDir('Next','http://www.animefreak.tv/'+paginates,632,art+'/next2.png')