def LINK(name, url): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace(' ', '') match = re.compile( '>Watch it here :</span>.+?<a href="([^"]*?)">').findall(link) for url in match: LINKZ(name, str(url))
def Seasons(url): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('–', ' - ') match = re.compile( '<strong>Season([^"]*?)</strong></span></p><ul><li>').findall(link) for season in match: print season name = season main.addDir('Season ' + season, url, 9, '', '', '')
def Episodes(url): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('–', ' - ') match = re.compile( '<li><strong><a href="([^<]+)">([^<]+)</a>([^<]+)</strong>').findall( link) for url, title, title1 in match: title = title + ' ' + title1 #url = url.replace('watch-','watch/')+'/' main.addInfo(title, url, 10, '', '', '')
def AZLIST(url): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('–', ' - ') #match=re.compile('<li><a href="([^"]*)" title="[^"]*">[%s]([^"]*)</a>'% name).findall(link) match = re.compile( '<li><strong><a href="([^<]+)">[%s]([^<]+)</a></strong></li>' % name).findall(link) for url, title in match: title = name + title #url = url.replace('watch-','watch/')+'/' main.addInfo(title, url, 9, '', '', '')
def LINK(name, url): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('IFRAME SRC', 'iframe src') match = re.compile( '>Watch it here :</span>.+?<a href="([^"]*?)">').findall(link) for url in match: LINKZ(name, str(url)) matchtwo = re.compile( '>Update :</span> If you dont see any Player. Refresh <br />').findall( link) if len(matchtwo) > 0: LINKZ(name, str(url))
def SEASONS(name, url, index=False): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('–', ' - ').replace('<br />', '').replace( '’', "'").replace(' rel="nofollow"', '') seasons = re.compile( '(?sim)(Season [0-9]+)</strong>.+?<ul>(.*?)(?=<ul|/ul)').findall(link) if not re.search('<strong>(\d+)</strong>', link): seasons = reversed(seasons) for season, data in seasons: #episodes = re.compile('<li><strong><a href="([^"]*?)" rel="nofollow">([^"]*?)</a>([^"]*?)</strong></li>',re.DOTALL).findall(data) episodes = re.compile( '<li><strong><a href="([^"]*?)">([^"]*?)</a>([^"]*?)</strong></li>' ).findall(data) #if len(episodes) > 0: main.addDir(name + ' ' + season.strip(), urllib.quote(str(episodes)), 10, '', '', index=index)
def NewRelease(url): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('–', ' - ') match = re.compile( 'class="tvbox">.+?<a href="([^"]*?)" title="Watch([^"]*?)Online" ><span style="background-image: url[(]([^"]*?)[)]" class.+?' ).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, name, thumb in match: name = name.replace('–', ' - ').replace('…', '...') thumb = 'http://www.couchtuner.la' + thumb main.addDirTE(name, 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 pagetwo = re.compile('content="Page 2:').findall(link) if len(pagetwo) > 0: xurl = 'http://www.couchtuner.la/page/3/' main.addDir('Page 3', xurl, 1, '') pagethree = re.compile('content="Page 3:').findall(link) if len(pagethree) > 0: xurl = 'http://www.couchtuner.la/page/4/' main.addDir('Page 4', xurl, 1, '') pagefour = re.compile('content="Page 4:').findall(link) if len(pagefour) > 0: xurl = 'http://www.couchtuner.la/page/5/' main.addDir('Page 5', xurl, 1, '') else: main.addDir('Page 2', 'http://www.couchtuner.la/page/2/', 1, '') else: match = re.compile( 'class="tvbox">.+?<a href="([^"]*?)" title="Watch([^"]*?)Online" ><span style="background-image: url[(]([^"]*?)[)]" class.+?' ).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 = name.replace('–', ' - ').replace('…', '...') thumb = 'http://www.couchtuner.la' + thumb main.addDirTE(name, 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 nextpage = re.compile('<strong>Previous <a href="([^"]*?)">').findall( link) for url in nextpage: xurl = base_url + url main.addDir('Next Page', xurl, 1, '')
def NewRelease(url): link = main.OPEN_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('–', ' - ') match = re.compile( 'class="tvbox">.+?<a href="([^"]*?)" title="Watch([^"]*?)Online" ><span style="background-image: url[(]([^"]*?)[)]" class.+?' ).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, name, thumb in match: thumb = 'http://www.couchtuner.eu' + thumb main.addDirTE(name, 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 else: match = re.compile( 'class="tvbox">.+?<a href="([^"]*?)" title="Watch([^"]*?)Online" ><span style="background-image: url[(]([^"]*?)[)]" class.+?' ).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: thumb = 'http://www.couchtuner.eu' + thumb main.addDirTE(name, 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 nextpage = re.compile( '<div class="prev-page"><strong>Previous <a href="([^"]*)">[^"]*</a></strong>' ).findall(link) if nextpage: xurl = base_url + nextpage[0] main.addDir('Next Page', xurl, 1, '')