def GetSingleLink(section, url, startPage= '1', numOfPages= '1'): print 'Proses penyenaraian tajuk cerita %s' % url pageUrl = url searchurl = url.split("?") searchurl = searchurl[0] match = re.search('acgtube', url) if match: searchurl = BASE_URL + '/acgtube/search/' if int(startPage)> 1: pageUrl = url + '&page=' + startPage print pageUrl html = net.http_GET(pageUrl).content.encode('utf-8') checkauthorize = re.search('MVO AUTHORIZATION', html) if checkauthorize: df.paircheck() return listitem = GetMediaInfo(html) start = int(startPage) end = start + int(numOfPages) for page in range( start, end): if ( page != start): pageUrl = url + 'page/' + str(page) + '/' html = net.http_GET(pageUrl).content.encode('utf-8') match = re.compile('href=\"(.+?)\"\stitle=\"(.+?)\".+?target.+?\"><img src="(.+?)"', re.DOTALL).findall(html) addon.add_directory({'mode': 'GetSearchQuery', 'url': searchurl}, {'title': '[COLOR yellow]Malay Video Online[/COLOR]'}, img=IconPath + 'search.png', fanart=FanartPath + 'fanart.png') for movieUrl, name, img in match: #addon.add_directory({'mode': 'GetLinks', 'section': section, 'url': movieUrl}, {'title': name.strip()}, img= img, fanart=FanartPath + 'fanart.png') addon.add_directory({'mode': 'PlayVideo', 'url': movieUrl, 'listitem': listitem}, {'title': name.strip()}, img= img, fanart=FanartPath + 'fanart.png') addon.add_directory({'mode': 'GetTitles', 'url': url, 'startPage': str(end), 'numOfPages': numOfPages}, {'title': '[COLOR blue][B][I]Next page...[/B][/I][/COLOR]'}, img=IconPath + 'next.png', fanart=FanartPath + 'fanart.png') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def GetEpisodelinks(section, url): print 'GETLINKS FROM URL: ' + url html = net.http_GET(url).content.encode('utf-8') checkauthorize = re.search('MVO AUTHORIZATION', html) if checkauthorize: df.paircheck() return listitem = GetMediaInfo(html) content = html match = re.compile('<.+?href="(.+?)".+?>(.+?)<').findall(content) listitem = GetMediaInfo(content) for url, name in match: r = re.search('link=', content) if r: addon.add_directory( { 'mode': 'GetLinks', 'section': section, 'url': url }, {'title': name.strip()}, fanart=FanartPath + 'fanart.png') else: host = GetDomain(url) #if urlresolver.HostedMediaFile(url= url): addon.add_directory( { 'mode': 'PlayVideo', 'url': url, 'listitem': listitem }, {'title': host}, img=IconPath + 'play.png', fanart=FanartPath + 'fanart.png') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def MainMenu(): #homescreen addon.add_directory({'mode': 'AcgMenu'}, {'title': '[COLOR red]DRAMA/TELEMOVIE[/COLOR]'}, img=IconPath + 'acgico.png', fanart=FanartPath + 'fanart.png') addon.add_directory({'mode': 'Dfm2uMenu'}, {'title': '[COLOR blue]MALAY-MVO[/COLOR]'}, img=IconPath + 'acgico.png', fanart=FanartPath + 'fanart.png') addon.add_directory({'mode': 'EnglishMenu'}, {'title': '[COLOR yellow]ENGLISH-MVO[/COLOR]'}, img=IconPath + 'eng.png', fanart=FanartPath + 'fanart.png') addon.add_directory({'mode': 'HindustanMenu'}, {'title': '[COLOR green]HINDUSTAN-MVO[/COLOR]'}, img=IconPath + 'movie.png', fanart=FanartPath + 'movie.png') addon.add_directory({'mode': 'KoreaMenu'}, {'title': '[COLOR green]KOREA-MVO[/COLOR]'}, img=IconPath + 'korea.png', fanart=FanartPath + 'korea.png') addon.add_directory({'mode': 'AnimeMenu'}, {'title': '[COLOR green]ANIME-MVO[/COLOR]'}, img=IconPath + 'anime.png', fanart=FanartPath + 'anime.png') addon.add_directory({'mode': 'AnimationMenu'}, {'title': '[COLOR green]ANIMATION-MVO[/COLOR]'}, img=IconPath + 'animation.png', fanart=FanartPath + 'animation.png') addon.add_directory({'mode': 'ChineseMenu'}, {'title': '[COLOR green]CHINESE-MVO[/COLOR]'}, img=IconPath + 'chinese.png', fanart=FanartPath + 'chinese.png') addon.add_directory({'mode': 'ThailandMenu'}, {'title': '[COLOR green]THAILAND-MVO[/COLOR]'}, img=IconPath + 'movie.png', fanart=FanartPath + 'movie.png') addon.add_directory({'mode': 'MelayuFilemMenu'}, {'title': '[COLOR yellow]MelayuFilem-MVO[/COLOR]'}, img=IconPath + 'movie.png', fanart=FanartPath + 'movie.png') addon.add_directory({'mode': 'ComingSoonMenu'}, {'title': '[COLOR yellow]Coming Soon[/COLOR]'}, img=IconPath + 'cs.png', fanart=FanartPath + 'cs.png') addon.add_directory({'mode': 'RequestMenu'}, {'title': '[COLOR yellow]Request-MVO[/COLOR]'}, img=IconPath + 'request.png', fanart=FanartPath + 'request.png') #addon.add_directory({'mode': 'ResolverSettings'}, {'title': '[COLOR red]Resolver Settings[/COLOR]'}, img=IconPath + 'resolver.png', fanart=FanartPath + 'fanart.png') xbmcplugin.endOfDirectory(int(sys.argv[1])) df.paircheck()
def GetSingleLink(section, url, startPage='1', numOfPages='1'): print 'Proses penyenaraian tajuk cerita %s' % url pageUrl = url searchurl = url.split("?") searchurl = searchurl[0] match = re.search('acgtube', url) if match: searchurl = BASE_URL + '/acgtube/search/' if int(startPage) > 1: pageUrl = url + '&page=' + startPage print pageUrl html = net.http_GET(pageUrl).content.encode('utf-8') checkauthorize = re.search('MVO AUTHORIZATION', html) if checkauthorize: df.paircheck() return listitem = GetMediaInfo(html) start = int(startPage) end = start + int(numOfPages) for page in range(start, end): if (page != start): pageUrl = url + 'page/' + str(page) + '/' html = net.http_GET(pageUrl).content.encode('utf-8') match = re.compile( 'href=\"(.+?)\"\stitle=\"(.+?)\".+?target.+?\"><img src="(.+?)"', re.DOTALL).findall(html) addon.add_directory({ 'mode': 'GetSearchQuery', 'url': searchurl }, {'title': '[COLOR yellow]Malay Video Online[/COLOR]'}, img=IconPath + 'search.png', fanart=FanartPath + 'fanart.png') for movieUrl, name, img in match: #addon.add_directory({'mode': 'GetLinks', 'section': section, 'url': movieUrl}, {'title': name.strip()}, img= img, fanart=FanartPath + 'fanart.png') addon.add_directory( { 'mode': 'PlayVideo', 'url': movieUrl, 'listitem': listitem }, {'title': name.strip()}, img=img, fanart=FanartPath + 'fanart.png') addon.add_directory( { 'mode': 'GetTitles', 'url': url, 'startPage': str(end), 'numOfPages': numOfPages }, {'title': '[COLOR blue][B][I]Next page...[/B][/I][/COLOR]'}, img=IconPath + 'next.png', fanart=FanartPath + 'fanart.png') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def GetLinks(section, url): print 'GETLINKS FROM URL: '+url html = net.http_GET(url).content.encode('utf-8') checkauthorize = re.search('MVO AUTHORIZATION', html) if checkauthorize: df.paircheck() return listitem = GetMediaInfo(html) content = html match = re.compile('href="(.+?)"').findall(content) listitem = GetMediaInfo(content) for url in match: host = GetDomain(url) #if urlresolver.HostedMediaFile(url= url): addon.add_directory({'mode': 'PlayVideo', 'url': url, 'listitem': listitem}, {'title': host }, img=IconPath + 'play.png', fanart=FanartPath + 'fanart.png') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def GetEpisode(section, url, startPage='1', numOfPages='1'): print 'Proses penyenaraian tajuk cerita %s' % url pageUrl = url if int(startPage) > 1: pageUrl = url + '&page=' + startPage print pageUrl searchurl = url.split("?") html = net.http_GET(pageUrl).content.encode('utf-8') checkauthorize = re.search('MVO AUTHORIZATION', html) if checkauthorize: df.paircheck() return start = int(startPage) end = start + int(numOfPages) for page in range(start, end): if (page != start): pageUrl = url + 'page/' + str(page) + '/' html = net.http_GET(pageUrl).content.encode('utf-8') match = re.compile('<h2.+?href="(.+?)".+?>(.+?)<.+?src="(.+?)"', re.DOTALL).findall(html) addon.add_directory({ 'mode': 'GetSearchQuery', 'url': searchurl[0] }, {'title': '[COLOR yellow]Malay Video Online[/COLOR]'}, img=IconPath + 'search.png', fanart=FanartPath + 'fanart.png') for movieUrl, name, img in match: addon.add_directory( { 'mode': 'GetEpisodelinks', 'section': section, 'url': movieUrl }, {'title': name.strip()}, img=img, fanart=FanartPath + 'fanart.png') addon.add_directory( { 'mode': 'GetTitles', 'url': url, 'startPage': str(end), 'numOfPages': numOfPages }, {'title': '[COLOR blue][B][I]Next page...[/B][/I][/COLOR]'}, img=IconPath + 'next.png', fanart=FanartPath + 'fanart.png') xbmcplugin.endOfDirectory(int(sys.argv[1]))
def GetEpisode(section, url, startPage= '1', numOfPages= '1'): print 'Proses penyenaraian tajuk cerita %s' % url pageUrl = url if int(startPage)> 1: pageUrl = url + '&page=' + startPage print pageUrl searchurl = url.split("?") html = net.http_GET(pageUrl).content.encode('utf-8') checkauthorize = re.search('MVO AUTHORIZATION', html) if checkauthorize: df.paircheck() return start = int(startPage) end = start + int(numOfPages) for page in range( start, end): if ( page != start): pageUrl = url + 'page/' + str(page) + '/' html = net.http_GET(pageUrl).content.encode('utf-8') match = re.compile('<h2.+?href="(.+?)".+?>(.+?)<.+?src="(.+?)"', re.DOTALL).findall(html) addon.add_directory({'mode': 'GetSearchQuery', 'url': searchurl[0]}, {'title': '[COLOR yellow]Malay Video Online[/COLOR]'}, img=IconPath + 'search.png', fanart=FanartPath + 'fanart.png') for movieUrl, name, img in match: addon.add_directory({'mode': 'GetEpisodelinks', 'section': section, 'url': movieUrl}, {'title': name.strip()}, img= img, fanart=FanartPath + 'fanart.png') addon.add_directory({'mode': 'GetTitles', 'url': url, 'startPage': str(end), 'numOfPages': numOfPages}, {'title': '[COLOR blue][B][I]Next page...[/B][/I][/COLOR]'}, img=IconPath + 'next.png', fanart=FanartPath + 'fanart.png') xbmcplugin.endOfDirectory(int(sys.argv[1]))