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 LISTSCEPER2(name, murl): link = main.OPENURL(murl, timeout=10) link = link.replace('\xc2\xa0', '').replace('\n', '') match = re.compile( '<a href="([^<]+)">([^<]+)</a></h2>\t\t<div class=".+?<img.+?src="([^"]+?)"' ).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 url, name, thumb in match: name = main.CleanTitle(name) main.addPlayTE(name, url, 544, 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 class="nextpostslink" rel="next" href="([^"]+)">').findall(link) if len(paginate) > 0: main.addDir('Next', paginate[0], 545, art + '/next2.png')
def LISTTV(murl): link = main.OPENURL(murl) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('\\', '') match = re.compile( """<a href="([^<]+)" rel="bookmark" title=".+?">(.+?)</a></h2><div class="cat meta">.+?<img.+?src=([^<]+jpg|gif|jpeg|png)""", re.DOTALL).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 url, name, thumb in match: name = main.CleanTitle(name) thumb = thumb.replace('"', '').replace(",", '') main.addPlayTE(name, url, 390, 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 class="nextpostslink" [^>]*?href="([^"]+)"').findall(link) if len(paginate) > 0: main.addDir('Next', paginate[0], 391, art + '/next2.png')
def SEARCHSCEPER(murl=''): main.GA("Sceper", "Search") encode = main.updateSearchFile(murl, 'Movies', searchMsg='Search For Movies or TV Shows') if not encode: return False surl = 'http://sceper.ws/search/' + encode + '/' link = main.OPENURL(surl, cookie="sceper") i = 0 link = link.replace('\xc2\xa0', '').replace('\n', '') match = re.compile('<a href="([^<]+)">([^<]+)</a></h2>').findall(link) for url, name in match: name = main.CleanTitle(name) if re.findall('(.+?)\ss(\d+)e(\d+)\s', name, re.I): main.addPlayTE(name, url, 544, '', '', '', '', '', '') else: main.addPlayM(name, url, 544, '', '', '', '', '', '') xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
def superSearch(encode, type): try: returnList = [] if not encode: return returnList surl = 'http://sceper.ws/search/' + encode + '/' link = main.OPENURL(surl, verbose=False) link = link.replace('\xc2\xa0', '').replace('\n', '') match = re.compile('<a href="([^<]+)">([^<]+)</a></h2>').findall(link) for url, name in match: name = main.CleanTitle(name) if type == 'Movies' and not re.findall( '(.+?)\ss(\d+)e(\d+)', name, re.I) or type == 'TV' and re.findall( '(.+?)\ss(\d+)e(\d+)', name, re.I): returnList.append((name, prettyName, url, '', 544, False)) return returnList except: return []
def SEARCHSCENE(encode): main.GA(prettyName, "Search") if encode == 'sec': encode = main.updateSearchFile( '', 'Movies', searchMsg='Search For Movies or TV Shows') if not encode: return False surl = 'http://www.scenesource.me/?s=' + encode + '&x=0&y=0' link = main.OPENURL(surl, mobile=True) i = 0 link = link.replace('\xc2\xa0', '').replace('\n', '') match = re.compile( '<a href="([^<]+)" rel="bookmark" title=".+?>([^<]+)</a></h2>' ).findall(link) for url, name in match: name = main.CleanTitle(name) if re.findall('(.+?)\ss(\d+)e(\d+)\s', name, re.I): main.addPlayTE(name, url, 390, '', '', '', '', '', '') else: main.addPlayM(name, url, 390, '', '', '', '', '', '') xbmcplugin.setContent(int(sys.argv[1]), 'Movies')
def superSearch(encode, type): try: if type == 'Movies': cat = 'Movies-XviD,Movies-720p,Movies-480p,Movies-Foreign,Movies-DVDR,' else: cat = 'TV-XviD,TV-Mp4,TV-720p,TV-480p,TV-Foreign,' surl = 'http://tv-release.net/?s=' + encode + '&cat=' + cat returnList = [] link = main.OPENURL(surl, verbose=False) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(' ', '') pattern = '<tr><td[^>]*?><a [^>]*?>([^<]*?)</a></td><td[^>]*?><a href=\'([^\']*?)\'[^>]*?>([^<]*?)<' r = re.findall(pattern, link, re.I | re.M | re.DOTALL) for tag, url, name in r: if re.search('(?i)WEB-DL', name): tag = tag.strip() + " WEB-DL" if re.findall('\d+p\s', name): r = re.findall('(.+?)\s(\d+p)\s', name) for name, quality in r: tag = tag.replace('720p', quality) pass if re.findall('\ss\d+e\d+\s', name, re.I | re.DOTALL): r = re.findall('(.+?)\ss(\d+)e(\d+)\s', name, re.I) for name, season, episode in r: name = name + ' S' + season + 'E' + episode elif re.findall('\s\d{4}\s\d{2}\s\d{2}\s', name): r = re.findall('(.+?)\s(\d{4})\s(\d{2})\s(\d{2})\s', name) for name, year, month, day in r: name = name + ' ' + year + ' ' + month + ' ' + day elif re.findall('\shdtv\sx', name, re.I): r = re.findall('(.+?)\shdtv\sx', name, re.I) for name in r: pass name = name + ' [COLOR red]' + re.sub('(?sim)^(TV-|Movies-)(.*)', '\\2', tag) + '[/COLOR]' returnList.append( (main.CleanTitle(name), prettyName, url, '', 1003, True)) return returnList except: return []
def superSearch(encode, type): try: returnList = [] if not encode: return returnList surl = 'http://www.scenesource.me/?s=' + encode + '&x=0&y=0' link = main.OPENURL(surl, verbose=False, mobile=True) link = link.replace('\xc2\xa0', '').replace('\n', '') match = re.compile( '<a href="([^<]+)" rel="bookmark" title=".+?>([^<]+)</a></h2>' ).findall(link) for url, name in match: name = main.CleanTitle(name) if type == 'Movies' and not re.findall( '\ss(\d+)e(\d+)', name, re.I) or type == 'TV' and re.findall( '\ss(\d+)e(\d+)', name, re.I): returnList.append((name, prettyName, url, '', 390, False)) return returnList except: return []
def superSearch(encode, type): try: returnList = [] encode = urllib.unquote(encode).replace(' ', '+') if type == 'Movies': surl = 'http://myvideolinks.me/?s=' + encode else: surl = 'http://tv.myvideolinks.eu/?s=' + encode link = main.OPENURL(surl, verbose=False, mobile=True) link = main.unescapes(link) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(' ', '') match = re.compile(pattern).findall(link) for url, thumb, name in match: name = main.CleanTitle(name) if type == 'TV' or type == 'Movies' and not re.findall( 'HDTV', name): returnList.append((name, prettyName, url, thumb, 35, True)) return returnList except: return []
def LISTMOVIES(murl): main.GA(prettyName, "List") link = main.OPENURL(murl) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('\\', '') match = re.compile( '''<a href="([^<]+)" rel="bookmark" title=".+?">(.+?)</a></h2><div.+?<img.+?src="(.+?)".*?http://www.imdb.com/title/([t\d]+?)[/"']''', 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) xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)") for url, name, thumb, imdb in match: name = main.CleanTitle(name) if re.findall('\ss(\d+)\s', name, re.I): main.addPlayT(name, url, 390, thumb, '', '', '', '', '') else: main.addPlayM(name, url, 390, 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(): break dialogWait.close() del dialogWait paginate = re.compile( '<a class="nextpostslink"[^>]+?href="([^"]+)"').findall(link) if paginate and loadedLinks >= totalLinks: main.addDir('Next', paginate[0], 389, art + '/next2.png') main.VIEWS()
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 INDEX(url): types = [] SearchType = None if '!' in url: r = url.rpartition('!') print r url = r[0] SearchType = r[2] else: url = url if 'cat=TV' in url: types = 'tv' elif 'cat=Movies' in url: types = 'movie' html = GETHTML(url) if html == None: return pattern = '<tr><td[^>]*?><a [^>]*?>([^<]*?)</a></td><td[^>]*?><a href=\'([^\']*?)\'[^>]*?>([^<]*?)<' r = re.findall(pattern, html, re.I | 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 tag, url, name in r: if re.search('(?i)WEB-DL', name): tag = tag.strip() + " WEB-DL" if re.findall('\d{4}p', name): r = re.findall('(.+?)\s(\d+p)', name) for name, quality in r: tag = tag.replace('720p', quality) pass if re.findall('\ss\d+e\d+\s', name, re.I | re.DOTALL): r = re.findall('(.+?)\ss(\d+)e(\d+)\s', name, re.I) for name, season, episode in r: name = name + ' S' + season + 'E' + episode elif re.findall('\s\d{4}\s\d{2}\s\d{2}\s', name): r = re.findall('(.+?)\s(\d{4})\s(\d{2})\s(\d{2})\s', name) for name, year, month, day in r: name = name + ' ' + year + ' ' + month + ' ' + day elif re.findall('\shdtv\sx', name, re.I): r = re.findall('(.+?)\shdtv\sx', name, re.I) for name in r: pass name = re.sub('\s\s+', ' ', name).strip() name = name + ' [COLOR red]' + re.sub('(?sim)^(TV-|Movies-)(.*)', '\\2', tag) + '[/COLOR]' if SearchType == None: if 'TV' in tag: main.addDirTE(main.CleanTitle(name), url, 1003, '', '', '', '', '', '') elif 'Movies' in tag: if re.findall('\s\d+\s', name): r = name.rpartition('\s\d{4}\s') main.addDirM(main.CleanTitle(name), url, 1003, '', '', '', '', '', '') elif SearchType == 'tv' and 'TV' in tag: main.addDirTE(main.CleanTitle(name), url, 1003, '', '', '', '', '', '') elif SearchType == 'movie' and 'Movies' in tag: r = name.rpartition('\s\d{4}\s') main.addDirM(main.CleanTitle(name), url, 1003, '', '', '', '', '', '') 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(): break dialogWait.close() del dialogWait if "<div class='zmg_pn'" in html and loadedLinks >= totalLinks: r = re.findall( """<span class='zmg_pn_current'>(\d+?)</span>[^<]*?<span class='zmg_pn_standar'><a href="([^"]+?)">""", html, re.I | re.DOTALL | re.M) total = re.findall('">(\d+)</a></span>', html) if total: total = total[-1] else: total = "1" for current, url in r: name = 'Page ' + current + ' of ' + total + ' [COLOR green]Next Page >>>[/COLOR]' main.addDir('[COLOR green]Go to Page[/COLOR]', url + ':' + total, 1002, art + '/gotopagetr.png') main.addDir(name, url.replace('%5C', ''), 1001, art + '/nextpage.png') main.VIEWS()
def LISTSP2(murl): if murl.startswith('3D'): main.addDir('Search Newmyvideolinks', 'movieNEW', 102, art + '/search.png') subpages = 2 max = 9 category = "3-d-movies" elif murl.startswith('TV'): main.addDir('Search Newmyvideolinks', 'tvNEW', 102, art + '/search.png') subpages = 3 max = 50 category = "tv-shows" else: main.addDir('Search Newmyvideolinks', 'movieNEW', 102, art + '/search.png') subpages = 5 max = 250 category = "bluray" parts = murl.split('-', 1) try: pages = parts[1].split(',', 1) page = int(pages[0]) max = int(pages[1]) murl = parts[0] except: page = 0 page = page * subpages urllist = '' urls = [] for n in range(subpages): if page + n + 1 > max: break if category == "tv-shows": urls.append('http://tv.myvideolinks.eu/page/' + str(page + n + 1)) else: urls.append('http://www.myvideolinks.me/category/movies/' + category + '/page/' + str(page + n + 1)) urllist = main.batchOPENURL(urls) hasNextPage = re.compile('>›</a>').findall(urllist) if category != "3-d-movies" and len( hasNextPage ) < subpages or category == "3-d-movies" and subpages * page > max: page = None else: hasMax = re.compile("page/(\d+?)/'>»</a>").findall(urllist) if hasMax: max = hasMax[0] if urllist: urllist = main.unescapes(urllist) #link=main.OPENURL(xurl) match = re.compile(pattern).findall(urllist) # if not match: # match=re.compile('<h3><a href="()([^"]+?)"[^>]+?title="([^"]+?)"').findall(urllist) if match: dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Movie list is cached.') totalLinks = len(match) loadedLinks = 0 remaining_display = 'Movies/Episodes Cached :: [B]' + str( loadedLinks) + ' / ' + str(totalLinks) + '[/B].' dialogWait.update(0, '[B]Will load instantly from now on[/B]', remaining_display) for url, thumb, title in match: if murl == 'TV': # if re.compile('720p').findall(title): title = main.CleanTitle(title) main.addDirTE(title, url, 35, thumb, '', '', '', '', '') else: title = main.CleanTitle(title) main.addDirM(title, url, 35, thumb, '', '', '', '', '') xbmcplugin.setContent(int(sys.argv[1]), 'Movies') loadedLinks = loadedLinks + 1 percent = (loadedLinks * 100) / totalLinks remaining_display = 'Movies/Episodes Cached :: [B]' + str( loadedLinks) + ' / ' + str(totalLinks) + '[/B].' dialogWait.update(percent, '[B]Will load instantly from now on[/B]', remaining_display) if dialogWait.iscanceled(): break if not page is None and loadedLinks >= totalLinks: main.addDir( 'Page ' + str(page / subpages + 1) + ' [COLOR blue]Next Page >>>[/COLOR]', murl + "-" + str(page / subpages + 1) + "," + str(max), 34, art + '/next2.png') dialogWait.close() del dialogWait main.GA("HD-3D-HDTV", "Newmyvideolinks") main.VIEWS()
def LISTSP3(murl): subpages = 5 if murl == 'HD': page = 1 max = 100 else: try: pages = murl.split(',', 1 ); page = int(pages[0]) max = int(pages[1]) except: page = 1 # http://www.filestube.to/query.html?q=1080p+bluray+-esubs+-msubs+-subs&hosting=85&select=mkv&sizefrom=6000&sizeto=20000&sort=dd&page=1 hosts = "" possiblehosts = ( ["lumfile.com","85"], ["turbobit.net","40"], # ["fileom.com","106"], # ["letitbit.net","25"], ) for h,n in possiblehosts: if main.supportedHost(h): hosts += n+"%2C" hosts = hosts.rstrip("%2C") url='http://www.filestube.to/query.html?q=1080p+bluray+-esubs&hosting='+hosts+'&select=mkv&sizefrom=5000&sizeto=20000&sort=dd' urls = [] for n in range(subpages): urls.append(url+"&page="+str(page+n)) if page+n == max: break page = page + subpages - 1 link=main.batchOPENURL(urls) # print link next = len(re.compile('>►</a>').findall(link)) == subpages link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','').replace('&','&') match=re.compile('(?sim)<a href="([^"]+?)"[^>]*?class="rL"[^>]*?>(.+?)</a>.*?class="eT.*?<b>([^>]*?)<').findall(link) dialogWait = xbmcgui.DialogProgress() ret = dialogWait.create('Please wait until Movie list is cached.') match1 = [] for url, name, hostsite in match: name = name.replace('<b>','').replace('</b>','') name=main.unescapes(name) if not re.search('(?i)(\\bsubs\\b|\\msubs\\b|fetish)',name) and re.search('(?i)(20\d\d|19\d\d)',name): match1.append((url,name,hostsite)) match = match1 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, hostsite in match: url = url.decode('utf-8').encode('ascii', 'ignore') url = 'http://www.filestube.to' + url main.addPlayM(main.CleanTitle(name.strip()) + " [COLOR red]" + hostsite + "[/COLOR]",url,406,'','','','','','') 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(): break if next and loadedLinks >= totalLinks: main.addDir('Page ' + str(page/subpages) + ' [COLOR blue]Next Page >>>[/COLOR]',str(page+1)+','+str(max),405,art+'/next2.png') dialogWait.close() del dialogWait main.GA("HD-TV","FilesTube") main.VIEWS()