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 GRABADULT(url): link = main.ADULT_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('<img src=images/star.gif>', '').replace('player=2', '').replace('play.', '').replace('embed.', '') matchname = re.compile( '<div align="left"><strong>Watch ([^"]*) on:</strong></div>').findall( link) for name in matchname: match = re.compile( '<a id="link-[^"]*" href="info.php[?]id=([^"]*)&([^"]*)&link=([^"]*)&host=[^"]*"><div class="[^"]*"><span class="([^"]*)"></span></div><div class="[^"]*">([^"]*)</div>' ).findall(link) for link1, age, link2, quality, host in match: url = base_url + 'player.php?authid=&id=' + link1 + '&link=' + link2 + '&type=older_v2&part=&site=inactive&ref=1' main.addDown2( name.strip() + " [COLOR blue]" + host.upper() + "[/COLOR]", url, 7, '.png', '.png')
def PLAY(name, url): sources = [] link = main.ADULT_URL(url) link = link.replace('\r', '').replace('\n', '').replace('\t', '').replace( ' ', '').replace('\\', '') xbmc.executebuiltin("XBMC.Notification(Please Wait!,Opening Link,2000)") match = re.compile('<p> Source: <a href="([^>]*)" target').findall(link) for url in match: hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile('location.href = \'([^>]*)\';').findall(link) for url in match: hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile('action=\'([^>]*)\'>').findall(link) for url in match: hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src="([^>]*)" frameborder="0" allowfullscreen=""></iframe></textarea></p>' ).findall(link) for url in match: hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src="([^"]*)" scrolling="no" allowfullscreen></iframe></textarea>' ).findall(link) for url in match: hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src="http://play.flashx.tv/player/embed.php[?]hash=([^"]*)" scrolling="no" allowfullscreen></iframe></center>' ).findall(link) for url in match: url = 'http://flashx.tv/video/' + url + '/' hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src="http://played.to/embed-([^"]*)-[^"]*.html" scrolling="no" allowfullscreen></iframe></textarea>' ).findall(link) for url in match: url = 'http://played.to/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( '<p> Source: <a href="http://cloudyvideos.com/([^"]*)" target' ).findall(link) for url in match: url = 'http://cloudyvideos.com/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'location.href = \'http://dropvideo.com/video/([^"]*)\';</script>' ).findall(link) for url in match: url = 'http://dropvideo.com/video/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( '<embed src="http://www.youtube.com/v/([^"]*)=en&fs=1&rel=0" type="application/x-shockwave-flash.+?</textarea>' ).findall(link) for url in match: url = 'https://www.youtube.com/watch?feature=player_embedded&v=' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src=\'http://embed.divxstage.eu/embed.php[?]v=([^"]*)&width=[^"]*&height=[^"]*\' scrolling=\'no\'></iframe></textarea>' ).findall(link) for url in match: url = 'http://www.divxstage.eu/video/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src=\'http://embed.movshare.net/embed.php[?]v=([^"]*)&width=[^"]*&height=[^"]*&color=[^"]*\' scrolling=\'no\'></iframe></textarea>' ).findall(link) for url in match: url = 'http://www.movshare.net/video/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src="http://embed.videoweed.es/embed.php[?]v=([^"]*)&width=[^"]*&height=[^"]*" scrolling="no"></iframe></textarea>' ).findall(link) for url in match: url = 'http://www.videoweed.es/file/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src=\'http://embed.novamov.com/embed.php[?]width=[^"]*&height=[^"]*&v=([^"]*)&px=1\' scrolling=\'no\'></iframe></textarea>' ).findall(link) for url in match: url = 'http://www.novamov.com/video/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'src=\'http://embed.nowvideo.sx/embed.php[?]width=[^"]*&height=[^"]*&v=([^"]*)\' scrolling=\'no\'></iframe></textarea>' ).findall(link) for url in match: url = 'http://www.nowvideo.sx/video/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) match = re.compile( 'href="http://mightyupload.com/embed-([^"]*)-.+?"><img src').findall( link) for url in match: url = 'http://mightyupload.com/' + url hosted_media = urlresolver.HostedMediaFile(url=url) sources.append(hosted_media) if (len(sources) == 0): xbmc.executebuiltin( "XBMC.Notification(Sorry!,Show doesn't have playable links,5000)") else: source = urlresolver.choose_source(sources) if source: stream_url = source.resolve() if source.resolve() == False: xbmc.executebuiltin( "XBMC.Notification(Sorry!,Link Cannot Be Resolved,5000)") return else: stream_url = False return listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png") listitem.setInfo('video', {'Title': name, 'Year': ''}) xbmc.Player().play(str(stream_url), listitem) main.addDir('', '', '', '')