Exemplo n.º 1
0
def Browse_List(url):
	html=nURL(url); html=messupText(html,True,True); 
	html=spAfterSplit(html,'<div class="ani-post">'); 
	html=spAfterSplit(html,'<div id="ddmcc_container">'); 
	html=spAfterSplit(html,'<div class="ddmcc">'); 
	html=spBeforeSplit(html,'</div>'); 
	#s='<li.*?><a href="(http://www.cartoon-world.tv/watch/(.+?)/)"><i class="icon-\D*-\D*"></i>\s*(.+?)\s*</a></li>'
	s='<li.*?><a.*?href="(http://www.cartoon-world.tv/watch/(.+?)/)".*?><i.*?></i>\s*(.+?)\s*</a></li>'
	matches=re.compile(s).findall(html); ItemCount=len(matches)
	if ItemCount==0: return
	if '/anime' in url.lower(): color_z=colors['8']
	elif '/cartoon' in url.lower(): color_z=colors['5']
	elif '/movie' in url.lower(): color_z=colors['1']
	else: color_z=colors['0']
	for _url,_folder,_name in matches:
		#fimg='http://www.dubbednetwork.net/static/'+_folder+'.jpg'
		#img='http://www.dubbednetwork.net/static/'+_folder+'.jpg'
		fimg='%simages/%s.jpg'%(mainSite,_folder)
		img='%simages/%s.jpg'%(mainSite,_folder)
		_title=cFL_(''+_name+'',color_z)
		pars={'mode':'Episodes','site':site,'section':section,'title':_name,'url':_url,'fanart':fimg,'img':img}
		contextLabs={'title':_name,'year':'0000','url':_url,'img':img,'fanart':fimg,'todoparams':_addon.build_plugin_url(pars),'site':site,'section':section,'plot':''}; 
		if 'movie' in url.lower(): contextMenuItems=ContextMenu_Movies(contextLabs)
		else: contextMenuItems=ContextMenu_Series(contextLabs)
		try: _addon.add_directory(pars,{'title':_title},is_folder=True,fanart=fimg,img=img,contextmenu_items=contextMenuItems,total_items=ItemCount)
		except: t=''
	set_view('tvshows',view_mode=addst('tvshows-view')); eod()
def Browse_EpisodesAnime(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = GetDataBeetwenMarkers(nURL(url), '<div class="views-row views-row-1 views-row-odd views-row-first">', '</section> <!-- /.block -->', False)[1]
    data = re.findall('<div class="field-content lista_odc_tytul_pozycja"><a href="/(.+?)">(.+?)</a>', html)
    ItemCount = len(data)
    print data
    for item in data:
        url2 = mainSite4 + item[0]
        name = item[1].encode("utf-8")
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': url2, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'PlayAnime', 'site': site, 'section': section, 'title': name, 'url': url2, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
# next page
    npage = url[:-1] + str(int(url[-1:]) + 1)
    print 'bbb' , npage
    if -1 != html.find("do strony "):
        _addon.add_directory({'mode': 'EpisodesAnime', 'site': site, 'section': section, 'url': npage, 'page': npage}, {'title': "Next page"}, is_folder=True, fanart=fanartAol, img=nexticon)
    set_view(content, view_mode=addst('links-view'))
    eod()
Exemplo n.º 3
0
def ListEpisodes(url,title):
	html=messupText(nURL(url),True); deb('length of html',str(len(html))); #debob(html)
	html=spAfterSplit(html,'<ul id="videoList_ul">'); html=spBeforeSplit(html,'</ul>'); 
	if len(html)==0: return
	s='<li class="vidItem \D+" id="video_(.+?)">\s*\n*\s*<div class="vidThumbContain">\s*\n*\s*<a id="vidlink_.+?" class="vidThumbLink" href="(/video/.+?/.+?/.+?)"></a>\s*\n*\s*<div class="vidThumbOverlay \D+"></div>\s*\n*\s*'
	s+='<img id="vidthumb_.+?" src="(http://cdn.wwtv.warnerbros.com/wbtv/channels/thumbs/\d\d\d\d/\d\d/\d\d/.+?.jpg)" height="\d+" width="\d+"/>\s*\n*\s*'
	s+='</div>\s*\n*\s*<div class="vidInfo">\s*\n*\s*<p class="vidtitle"><span id=".+?">(.*?)</span> - (.*?)</p>\s*\n*\s*\n*\s*\n*\s*<p id=".+?">\s*(.*?)\s*...</p>\s*\n*\s*<p id=".+?" style="display:none;">\s*(.*?)\s*...</p>\s*\n*\s*\n*\s*\n*\s*<div class="vidMoreLess"><a id=".+?" href="#">more</a></div>\s*\n*\s*\n*\s*\n*\s*</div>\s*\n*\s*</li>'
	s='<li class="vidItem \D+" id="video_.+?">(.+?)</li>'
	matches=re.compile(s).findall(nolines(html)); deb('# of matches found',str(len(matches))); #debob(matches)
	if len(matches)==0: return
	#for (idtag,_url,img,episodetitle,showtitle,plotoutline,plot) in matches:
	for match in matches:
		labs={}; labs['plot']=''; labs['plotoutline']=''; labs['showtitle']=''; labs['episodetitle']=''; labs['videoid']=''; 
		try: labs['videoid']+=re.compile('<a id="vidlink_(.+?-.+?-.+?-.+?-.+?)"').findall(match)[0]
		except: pass
		try: img=re.compile('<img id="vidthumb_.+?" src="(http://.+?.jpg)"').findall(match)[0]
		except: img=iconSite
		_url=mainSite2+re.compile('<a id="vidlink_.+?" class="vidThumbLink" href="(/video/.+?/.+?/.+?)">').findall(match)[0]
		try: labs['showtitle']+=re.compile('<div class="vidInfo">\s*\n*\s*<p class="vidtitle"><span id="vidtitle_.+?">\s*.*?\s*</span>\s*-\s*(.*?)</p>').findall(match)[0]
		except: pass
		try: labs['episodetitle']+=re.compile('<div class="vidInfo">\s*\n*\s*<p class="vidtitle"><span id="vidtitle_.+?">\s*(.*?)\s*</span>\s*-\s*.*?</p>').findall(match)[0]
		except: pass
		try: labs['plotoutline']+=re.compile('<p id="viddesctrunc_.+?">(.*?)</p>').findall(match)[0]
		except: pass
		try: labs['plot']+=re.compile('<p id="viddesc_.+?" style="display:none;">(.*?)</p>').findall(match)[0]
		except:
			try: labs['plot']+=re.compile('<p id="viddesc_.+?">(.*?)</p>').findall(match)[0]
			except: pass
		#debob([_url,img,labs])
		if (len(labs['showtitle'])==0) or (len(labs['episodetitle'])==0) or (len(img)==0) or (len(_url)==0): pass
		else:
			labs['title']=cFL(labs['episodetitle'],colors['0'])+CR+cFL(labs['showtitle'],colors['5'])
			try: _addon.add_directory({'mode':'GetMedia','img':img,'videoid':labs['videoid'],'url':_url,'title':labs['showtitle']+' - '+labs['episodetitle'],'site':site},labs,is_folder=True,fanart=fanartSite,img=img)
			except: pass
	set_view('episodes',view_mode=addst('episode-view')); eod()
Exemplo n.º 4
0
def Browse_EpisodesAnimeon(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    if "Odcinków w poczekalni" in html:
        url = url.replace('http://animeon.pl/anime/', 'http://animeon.pl/anime/poczekalnia/')
    else:
        url = url
    html = nURL(url)
    html = GetDataBeetwenMarkers(html, '<h2 class="float-left">Odcinki</h2>', '<div class="float-left"><h2 class="commentsFormH">Komentarze</h2></div>', False)[1]
    data = re.findall("<a href='(.+?)' title='(.+?)' ><strong>", html)
    ItemCount = len(data)
    for item in data:
        url = item[0]
        name = item[1].replace('odcinek', 'Odcinek')
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': url, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'Version', 'site': site, 'section': section, 'title': name, 'url': url, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Exemplo n.º 5
0
def Browse_Search(html,metamethod=''):
	#html=nURL(url); 
	html=messupText(html,True,True); 
	#s='<li.*?><a href="(http://www.cartoon-world.tv/watch/(.+?)/)"><i class="icon-\D*-\D*"></i>\s*(.+?)\s*</a></li>'
	s='<a.*?href="(http://www.cartoon-world.tv/(.+?))".*?>\s*\n*\s*<div id="image-spot">\s*\n*\s*\n*\s*<img src=".*?(http://.+?\.[jpg|png].*?)".*?>\s*\n*\s*\n*\s*</div>\s*\n*\s<div id="series-box">\s*\n*\s<div class="series-info-box">\s*\n*\s<div class="main-title">\s*\n*\s(.*?)\s*\n*\s</div>\s*\n*\s<div class=".*?">\s*\n*\s(.*?)\s*\n*\s</div>\s*\n*\s<span class=".*?">\s*\n*\s(.*?)\s*\n*\s</div>\s*\n*\s</div>\s*\n*\s</a>'
	s='<a href="(http://www.cartoon-world.tv/watch/(.+?)/)" class="box-link"><div id="image-spot">\s*\n*\s*\n*\s*<img src=".*?(http://.+?\.jpg).*?".*?></div><div id="series-box"><div class="series-info-box"><div class="main-title">\s*(.+?)\s*</div><div.*?>\s*(.*?)\s*</div><span.*?>\s*(.*?)\s*</div></div></a>'
	s='<li class="list-group-item"><a href="(http://www.cartoon-world.tv/watch/(.+?)/)">\s*([^<]+)</a'
	matches=re.compile(s).findall(html); ItemCount=len(matches); deb('# of items found',str(ItemCount))
	if ItemCount==0: return
	#for _url,_folder,_img,_name,_type,_status in matches:
	for _url,_folder,_name in matches:
		_img='%simages/%s.jpg'%(mainSite,_folder)
		_type=''
		_status=''
		
		if 'anime' in _type.lower(): color_z=colors['8']
		elif 'cartoon' in _type.lower(): color_z=colors['5']
		elif 'movie' in _type.lower(): color_z=colors['1']
		else: color_z=colors['0']
		fimg=_img; img=_img
		if len(_type) > 0: _title=cFL_(''+_name+'  '+cFL('['+_type+']',color_z),color_z)
		else: _title=cFL_(''+_name+'',color_z)
		
		pars={'mode':'Episodes','site':site,'section':section,'title':_name,'url':_url,'fanart':fimg,'img':img}
		contextLabs={'title':_name,'year':'0000','url':_url,'img':img,'fanart':fimg,'todoparams':_addon.build_plugin_url(pars),'site':site,'section':section,'plot':''}; 
		if ('movie' in _type.lower()) or ('movie'==_type.lower()) or (color_z==colors['0']): contextMenuItems=ContextMenu_Movies(contextLabs)
		else: contextMenuItems=ContextMenu_Series(contextLabs)
		try: _addon.add_directory(pars,{'title':_title},is_folder=True,fanart=fimg,img=img,contextmenu_items=contextMenuItems,total_items=ItemCount)
		except: t=''
Exemplo n.º 6
0
def Browse_Episodeswijaminne2(url, page, content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    html = GetDataBeetwenMarkers(html, '<table class="lista">', '</table>', False)[1]
    html = html.replace('\'', '')
    html = html.replace('\n', '')
    html = html.replace('\r', '')
    html = html.replace('\t', '')
    html = html.replace('  ', '')
    #print html.encode('ascii', 'ignore')
    data = re.findall('<a href="(.+?)"(.+?)alt="">(.+?)<\/a>', html)
    ItemCount = len(data)
    for item in data:
        strona = page + item[0]
        name = item[2].encode('utf-8')
        plot = ''
        img = ''
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': strona, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'Browse_PlayWbijam', 'site': site, 'section': section, 'title': name, 'url': strona,'page': url, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    eod()
def Browse_EpisodesAnime(url, page='', content='episodes', view='515'):
    if url == '':
        return
    if '?page=0'in url:
        link = url.replace('?page=0','')
    else:
        link = url
    html = GetDataBeetwenMarkers(nURL(link), '<div id="block-views-lista-odcink-w-block', '</ul>', False)[1]
    data = re.findall('<a href="(.+?)">(.+?)</a>', html)
    ItemCount = len(data)
    for item in data:
        url2 = item[0]
        name = item[1].encode("utf-8")
        name = ParseDescription(name)
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': url2, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'PlayAnime', 'site': site, 'section': section, 'title': name, 'url': url2, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
# next page
#    npage = url[:-1] + str(int(url[-1:]) + 1)
#    if -1 != html.find("do strony "):
#        _addon.add_directory({'mode': 'EpisodesAnime', 'site': site, 'section': section, 'url': npage, 'page': npage}, {'title': "Next page"}, is_folder=True, fanart=fanartAol, img=nexticon)
    eod()
Exemplo n.º 8
0
def SubSubMenu():
    ###Anime-Online###
    if section == 'animeonline':
        tUrl = mainSite4 + 'anime'
        for az, xy in zip(AonlineAlphabet, AonlineAlphabet):
            _addon.add_directory(
                {
                    'mode': 'Pageanimeonline',
                    'site': site,
                    'section': section,
                    'url': tUrl,
                    'page': xy
                }, {'title': az},
                is_folder=True,
                fanart=fanartAol,
                img=addonPath + '/art/' + az + '.png')
    if section == 'animedrama':
        tUrl = mainSite4 + 'Drama/viewpage.php?page_id='
        for az, xy in zip(MyAlphabet, AonlineDrama):
            _addon.add_directory(
                {
                    'mode': 'Pageanimeonline',
                    'site': site,
                    'section': section,
                    'url': tUrl + xy
                }, {'title': az},
                is_folder=True,
                fanart=fanartAol,
                img=addonPath + '/art/' + az + '.png')
    eod()
def Browse_EpisodesAnimecentrum(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    data = re.findall('<a href="(.+?)" title="(.+?)"><h2>', html)
    ItemCount = len(data)
    for item in data:
        url2 = mainSite + item[0]
        name = item[1].encode("utf-8")
        name = ParseDescription(name)
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': url2, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'PlayAnimecentrum', 'site': site, 'section': section, 'title': name, 'url': url2, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
# next page
    npage = url[:-1] + str(int(url[-1:]) + 1)
    if -1 != html.find("pagination"):
        _addon.add_directory({'mode': 'EpisodesAnimecentrum', 'site': site, 'section': section, 'url': npage, 'page': npage}, {'title': "Next page"}, is_folder=True, fanart=fanartAol, img=nexticon)
    eod()
Exemplo n.º 10
0
def BrowseMenu():
	_addon.add_directory({'mode':'BrowseCat','site':site,'cat':'popular','type':'js'},{'title':AFColoring('Popular')},is_folder=True,fanart=fanartSite,img=psgn('popular'))
	_addon.add_directory({'mode':'BrowseCat','site':site,'cat':'entertainment','type':'js'},{'title':AFColoring('Entertainment')},is_folder=True,fanart=fanartSite,img=psgn('entertainment'))
	_addon.add_directory({'mode':'BrowseCat','site':site,'cat':'gaming','type':'js'},{'title':AFColoring('Gaming')},is_folder=True,fanart=fanartSite,img=psgn('gaming'))
	_addon.add_directory({'mode':'BrowseCat','site':site,'cat':'music','type':'js'},{'title':AFColoring('Music')},is_folder=True,fanart=fanartSite,img=psgn('music'))
	_addon.add_directory({'mode':'BrowseCat','site':site,'cat':'social','type':'js'},{'title':AFColoring('Social')},is_folder=True,fanart=fanartSite,img=psgn('social'))
	set_view('list',view_mode=addst('default-view')); eod()
Exemplo n.º 11
0
def Fav_List(site='',section='',subfav=''):
	debob(['test1',site,section,subfav])
	favs=fav__COMMON__list_fetcher(site=site,section=section,subfav=subfav)
	ItemCount=len(favs)
	debob('test2 - '+str(ItemCount))
	if len(favs)==0: myNote('Favorites','None Found'); eod(); return
	debob(favs)
	for (_name,_year,_img,_fanart,_Country,_Url,_plot,_Genres,_site,_subfav,_section,_ToDoParams,_commonID,_commonID2) in favs:
		if _img > 0: img=_img
		else: img=iconSite
		if _fanart > 0: fimg=_fanart
		else: fimg=fanartSite
		debob('_ToDoParams'); debob(_ToDoParams)
		pars=_addon.parse_query(_ToDoParams)
		debob('pars'); debob(pars)
		_title=cFL_(_name,'white')
		if (len(_year) > 0) and (not _year=='0000'): _title+=cFL('  ('+cFL(_year,'deeppink')+')','pink')
		if len(_Country) > 0: _title+=cFL('  ['+cFL(_Country,'deeppink')+']','pink')
		
		contextLabs={'title':_name,'year':_year,'img':_img,'fanart':_fanart,'country':_Country,'url':_Url,'plot':_plot,'genres':_Genres,'site':_site,'subfav':_subfav,'section':_section,'todoparams':_ToDoParams,'commonid':_commonID,'commonid2':_commonID2}
		##contextLabs={'title':_name,'year':'0000','url':_url,'img':img,'fanart':fimg,'DateAdded':'','todoparams':_addon.build_plugin_url(pars),'site':site,'section':section}
		contextMenuItems=ContextMenu_Favorites(contextLabs)
		#contextMenuItems=[]
		_addon.add_directory(pars,{'title':_title,'plot':_plot},is_folder=True,fanart=fimg,img=img,total_items=ItemCount,contextmenu_items=contextMenuItems)
		#
	#
	if 'movie' in section.lower(): content='movies'
	else: content='tvshows'
	set_view(content,view_mode=int(addst('tvshows-view'))); eod()
Exemplo n.º 12
0
def Browse_Itemscen(html, name2, metamethod='', content='movies', view='515'):

    if (len(html) == 0):
        return
    html = html.encode('utf-8', '')
    html = GetDataBeetwenMarkers(html, 'Menu Główne</div>', 'pod_naglowek">Wiadomości</p>', False)[1]
    data = re.findall('">(.+?)</div>', html)
    ItemCount = len(data)
    if len(data) > 0:
        for item in data:
            strona = item

            name = strona
            img = ''
            plot = ''
            fanart = fanartAol
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
##
            pars = {'mode': 'Browse_Itemslist', 'site': site, 'section': section, 'title': name, 'url': strona, 'img': img, 'fanart': fanart}
            contextLabs = {'title': name, 'url': strona, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
            contextMenuItems = ContextMenu_Series(contextLabs)
            labs['title'] = name
            _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    eod()
Exemplo n.º 13
0
def Browse_ItemAon(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    data = re.findall("<img src='http://animeon.pl/images/anime_min/mins/(.+?)'(.+?)<a href='(.+?)'>(.+?)</a></strong>(.+?)<div>(.+?)</div>", html)
    ItemCount = len(data)
    for item in data:
            _url = item[2]
            name = item[3]
            img = 'http://animeon.pl/images/anime_min/' + item [0]
            fanart = fanartAol
            plot = item[5]
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
###
            pars = {'mode': 'EpisodesAnimeon', 'site': site, 'section': section, 'title': name, 'url': _url, 'img': img, 'fanart': fanart}
            contextLabs = {'title': name, 'url': _url, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
            if   section == 'movie':
                contextMenuItems = ContextMenu_Movies(contextLabs)
            elif section == 'animeon':
                contextMenuItems = ContextMenu_Series(contextLabs)
            else:
                contextMenuItems = []
            labs['title'] = name
            _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
# szukanie następnej strony
    npage = url[:-2] + str(int(url[-2:]) + 20)
    if -1 != html.find("div class='pagenav"):
            _addon.add_directory({'mode': 'Pageanimeon', 'site': site, 'section': section, 'url': npage, 'page': npage}, {'title': "Next page"}, is_folder=True, fanart=fanartAol, img=nexticon)
    set_view(content, view_mode=addst('tvshows-view'))
Exemplo n.º 14
0
def Browse_LatestEpisodes(mmurl):
	url_content=nolines(nURL(mainSite)).replace('</li>','</li\n\r>'); 
	#les=re.search(r"(?s)<h\d>Latest Episodes</h\d>(.+?)<h\d", url_content).group(1); 
	les=url_content.split('>Latest Episodes</h')[-1].split('</ul>')[0] #.split('>Site News</h')[0]
	les=_addon.unescape(les); les=unescape(les)
	# from universal import _common
	# les=_common.str_conv(les)
	les = les.encode('ascii', 'ignore')
	deb('Length of html',str(len(les))); 
	s='<li class="(.*?)">\s*<a href="(.+?)">\s*<span class=".*?rib">.*?</span>\s*'; 
	s+='(?:<noscript>\s*)?<img .*?src="(.+?)".*?/>\s*(?:</noscript>\s*)?'; 
	s+='<div class="ftitle">\s*(.+?)\s*</div>\s*</a>\s*</li'
	#<li class="Anime"><a href="http://www.cartoon-world.tv/future-card-buddyfight-episode-49/"><span class="Animerib">Anime</span> 
	#<img width="210" height="90" src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-lazy-type="image" data-lazy-src="http://www.cartoon-world.tv/static/future-card-buddyfight-episode-49-210x90.jpg" class="lazy lazy-hidden latest-ep wp-post-image" alt="Future Card Buddyfight Episode 49" /><noscript><img width="210" height="90" src="http://www.cartoon-world.tv/static/future-card-buddyfight-episode-49-210x90.jpg" class="latest-ep wp-post-image" alt="Future Card Buddyfight Episode 49" /></noscript><div class="ftitle">Future Card Buddyfight Episode 49</div></a></li>
	leS=re.compile(s).findall(les)
	#print les
	#for le in re.finditer(r'<li .*?class="(.+?)".*?>\s*<a .*?href="(.+?)".*?>\s*(?:<span>\s*\D*\s*</span>\s*)?<img.+? src="(.+?)".*?>\s*<div class=".*?">\s*(.+?)\s*</div></a></li', les):
	#print leS
	for (le_typ,le_url,le_img,le_ttl) in leS:
		#print le
		#le_typ=le.group(1); le_url=le.group(2); le_img=le.group(3); le_ttl=le.group(4)
		contextLabs={'title':le_ttl,'year':'0000','url':le_url,'img':le_img,'fanart':le_img,'DateAdded':'','type':le_typ}; contextMenuItems=ContextMenu_Episodes(labs=contextLabs)
		try: _addon.add_directory({'mode':'Hosts','site':site,'section':section,'title':le_ttl,'url':le_url,'fanart':le_img,'img':le_img},{'title':cFL_(le_ttl,colors['6'])},is_folder=True,fanart=le_img,img=le_img,contextmenu_items=contextMenuItems)
		except: t=''
	set_view('episodes',int(addst('episode-view'))); eod()
Exemplo n.º 15
0
def Browse_Episodes(url,page=''):
	html=nURL(url); html=messupText(html,True,True); htmlA=''+html
	html=spAfterSplit(html,'<div class="clearboth"></div>'); 
	html=spAfterSplit(html,'<ul'); 
	html=spBeforeSplit(html,'</ul>'); 
	try: _simg=re.compile('<div class=".*?-row">\s*\n*\s*<img.*?src="(.+?)".*?>\s*\n*\s*<table class=".*?-table">').findall(htmlA)[0]
	except: _simg=thumbnail
	try: _plot=re.compile('</tbody>\s*\n*\s*</table>\s*\n*\s*\n*\s*(.*?)\s*\n*\s*</div>\s*\n*\s*<div class="clearboth"></div>\s*\n*\s*<div class="ani-eps">').findall(htmlA)[0]
	except: _plot=''
	try: _type=re.compile('<tr><td.*?>Type</td><td.*?>\s*(.*?)\s*</td></tr>').findall(htmlA)[0]
	except: _type=''
	try: _year=re.compile('<tr><td.*?>Aired</td><td.*?>\s*(.*?)\s*</td></tr>').findall(htmlA)[0]
	except: _year=''
	try: _stitle=re.compile('<tr><td.*?>Title</td><td.*?>\s*(.*?)\s*</td></tr>').findall(htmlA)[0]
	except: _stitle=''
	debob([_stitle,_year,_type,_plot,_simg])
	s='<li.*?><a.*?href="(http://www.cartoon-world.tv/(.+?)/)".*?><i.*?></i>\s*(.+?)\s*</a></li>'
	matches=re.compile(s).findall(html); ItemCount=len(matches)
	if ItemCount==0: return
	if '/anime' in url.lower(): color_z=colors['8']
	elif '/cartoon' in url.lower(): color_z=colors['5']
	elif '/movie' in url.lower(): color_z=colors['1']
	else: color_z=colors['0']
	for _url,_folder,_name in matches:
		fimg=_simg; img=_simg #fimg=fanart; img=thumbnail
		
		_title=cFL_(''+_name+'',color_z)
		contextLabs={'title':_name,'year':'0000','url':_url,'img':img,'fanart':fimg}; contextMenuItems=ContextMenu_Episodes(contextLabs)
		labs={'title':_title,'plot':cFL('Year:  ',colors['11'])+cFL(_year,colors['10'])+cFL('    |    ','black')+cFL('Type:  ',colors['11'])+cFL(_type,colors['10'])+CR+cFL(_plot,colors['12']),'year':_year,'type':_type,'showtitle':_stitle,'fanart':fimg,'img':img}
		try: _addon.add_directory({'mode':'Hosts','site':site,'section':section,'title':_name,'url':_url,'fanart':fimg,'img':img},labs,is_folder=True,fanart=fimg,img=img,contextmenu_items=contextMenuItems,total_items=ItemCount)
		except: t=''
	set_view('episodes',view_mode=addst('episode-view')); eod()
def Browse_ItemRecenzje(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    data = byteify(json.loads(html))['items']
    ItemCount = len(data)
    for x in range(len(data)):
        item = data[x]
        name = item['snippet']['title']
        plot = item['snippet']['description']
        plot = clean_html(plot)
        img = item['snippet']['thumbnails']['high']['url']
        url = item['snippet']['resourceId']['videoId']
        strona = 'plugin://plugin.video.youtube/?action=play_video&videoid=%s' % url
        fanart = fanartAol
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
        contextLabs = {'title': name, 'year': '0000', 'url': strona, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': name, 'url': strona, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    eod()
def Browse_ItemAol(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    html = GetDataBeetwenMarkers(html, 'Tytu', '</table>', False)[1]
    data = re.findall('<a href="/(.+?)">(.+?)</a>', html)
    ItemCount = len(data)
    for item in data:
        strona = mainSite4 + item[0] + '?page=0'
        name = item[1].encode("utf-8")
### scraper
        meta = metaget.get_meta('tvshow', name)
        fanart = str(meta['backdrop_url']).replace('u','')
        img = str(meta['cover_url']).replace('u','')
        plot = meta['plot']
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        pars = {'mode': 'EpisodesAnime', 'site': site, 'section': section, 'title': name, 'url': strona, 'img': img, 'fanart': fanart}
        contextLabs = {'title': name, 'url': strona, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
        if   section == 'movie':
            contextMenuItems = ContextMenu_Movies(contextLabs)
        elif section == 'animeonline':
            contextMenuItems = ContextMenu_Series(contextLabs)
        elif section == 'animedrama':
            contextMenuItems = ContextMenu_Series(contextLabs)
        else:
            contextMenuItems = []
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, view_mode=addst('tvshows-view'))
Exemplo n.º 18
0
def Browse_EpisodesShniden(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url + '/episodes')
    html = GetDataBeetwenMarkers(html, 'list-episode-checkboxes', '</tbody>', False)[1]
    html = html.replace('\r\n', '')
    html = html.replace(' ', '')
    data = re.findall('<td>(.+?)</td>(.+?)<ahref="(.+?)"class="buttonactive">', html)
    ItemCount = len(data)
    for item in data:
        strona = mainSite5 + item[2]
        if 'fafa-fwfa-times' in item[1]:
            name2 = ' - niedostępny'
        else:
            name2 = ''
        name = "Odcinek " + html_entity_decode(item[0]) + name2
        img = ''
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {'title': name, 'year': '0000', 'url': strona, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {'mode': 'PlayShniden', 'site': site, 'section': section, 'title': name, 'url': strona, 'img': img, 'fanart': fanart}
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
def Browse_ItemsDramaQueen_dramamovie(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    idx = html.find("<div id='main' data-scroll-offset='88'>")
    if idx == -1:
        return
    idx2 = html.find('<span class="seperator extralight-border">', idx)
    if idx2 == -1:
        return
    html = html[idx:idx2]
    html = html.replace("\"", "\'")
    r = re.compile("uploads(.+?)'(.+?)href='(.+?)' title='(.+?)'>").findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for img, xxx, _url, _name in r:
            strona = _url
            _name2 = _name
            html2 = gethtml2.get(strona, addonPath)
            html2 = messupText(html2, ciastko, True, True)
            image = re.compile("<img src='http://www.dramaqueen.pl/wp-content/uploads/(.+?)' width").findall(html2)
            ItemCount = len(image)
            if len(image) > 0:
                for foto in image:
                    fanart = "http://www.dramaqueen.pl/wp-content/uploads/" + foto
            else:
                    fanart = ""
            img = "http://www.dramaqueen.pl/wp-content/uploads/" + img
#wyciąganie opisu
            idx = html2.find('itemprop="text" ><p><em>')
            if idx == -1:
                return
            idx2 = html2.find("</em></p>", idx)
            if idx2 == -1:
                return
            plot = html2[idx:idx2]
            plot = plot.decode("utf-8")
            plot = clean_html(plot)
            plot = plot.replace('itemprop="text" >', '')
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
#wyciąganie linku do filmu
            s = '<iframe src="http://vk.com/(.+?)"'
            matches = re.compile(s).findall(html2)
            ItemCount = len(matches)
            if ItemCount > 0:
                for _url in matches:
                    _url = 'http://vk.com/' + _url
                    _url = _url.replace("#038;", "")
                    _url = _url.replace("&hd=3", "")
            contextLabs = {'title': _name2, 'year': '0000', 'url': strona, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name2, 'url': _url, 'img': img, 'fanart': fanart}
            labs['title'] = _name2
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('tvshows-view')))
    eod()
Exemplo n.º 20
0
def GetMedia(VideoID,title='',url='',img=iconSite):
	html=messupText(nURL('http://metaframe.digitalsmiths.tv/v2/WBtv/assets/'+VideoID+'/partner/11?format=json'),True)
	s='"length": (\d+), "bitrate": "(.+?)", "uri": "(.+?://.+?)"'; matches=re.compile(s).findall(nolines(html)); deb('# of matches found',str(len(matches))); #debob(matches)
	for (_length,_name,_url) in matches:
		labs={'title':title+' - ['+_name+']'}
		try: _addon.add_directory({'mode':'PlayVideo','img':img,'studio':'['+_name+']','url':_url,'title':title,'site':site},labs,is_folder=False,fanart=fanartSite,img=img)
		except: pass
	set_view('list',view_mode=addst('default-view')); eod()
Exemplo n.º 21
0
def Browse_ItemAol(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    html = GetDataBeetwenMarkers(html, 'Tytu', '</table>', False)[1]
    data = re.findall('<a href="/(.+?)">(.+?)</a>', html)
    ItemCount = len(data)
    for item in data:
        strona = mainSite4 + item[0] + '?page=0'
        name = item[1].encode("utf-8")
        ### scraper
        meta = metaget.get_meta('tvshow', name)
        fanart = str(meta['backdrop_url']).replace('u', '')
        img = str(meta['cover_url']).replace('u', '')
        plot = meta['plot']
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''


###
        pars = {
            'mode': 'EpisodesAnime',
            'site': site,
            'section': section,
            'title': name,
            'url': strona,
            'img': img,
            'fanart': fanart
        }
        contextLabs = {
            'title': name,
            'url': strona,
            'img': img,
            'fanart': fanart,
            'todoparams': _addon.build_plugin_url(pars),
            'site': site,
            'section': section,
            'plot': labs['plot']
        }
        if section == 'movie':
            contextMenuItems = ContextMenu_Movies(contextLabs)
        elif section == 'animeonline':
            contextMenuItems = ContextMenu_Series(contextLabs)
        elif section == 'animedrama':
            contextMenuItems = ContextMenu_Series(contextLabs)
        else:
            contextMenuItems = []
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=True,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    set_view(content, view_mode=addst('tvshows-view'))
Exemplo n.º 22
0
def Browse_Episodeszone(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = GetDataBeetwenMarkers(nURL(url), '<h5>Odcinki</h5>', '</table>',
                                 False)[1]
    html = html.replace('\'', '')
    html = html.replace('\n', '')
    html = html.replace('\r', '')
    html = html.replace('\t', '')
    html = html.replace(' ', '')
    data = re.findall('<strong>(.+?)</strong></td><tdclass="episode-title">',
                      html)
    ItemCount = len(data)
    for item in data:
        url2 = url + '/' + item
        url2 = url2.replace('cinki', 'cinek')
        name = 'Odcinek ' + item
        name = ParseDescription(name)
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''


###
        contextLabs = {
            'title': name,
            'year': '0000',
            'url': url2,
            'img': img,
            'fanart': fanart,
            'DateAdded': '',
            'plot': labs['plot']
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlayAnimezone',
            'site': site,
            'section': section,
            'title': name,
            'url': url2,
            'img': img,
            'fanart': fanart
        }
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    eod()
Exemplo n.º 23
0
def Browse_Episodeskresk(mode, url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    html = html.replace('\'', '')
    html = html.replace('\n', '')
    html = html.replace('\r', '')
    html = html.replace('\t', '')
    html = GetDataBeetwenMarkers(html, '<header>Spis odcin',
                                 '<header>Komentarze</header>', False)[1]
    data = re.findall(
        'href="/kreskowka/(.+?)"><div(.+?)<b class="larger white">(.+?)</b>',
        html)
    ItemCount = len(data)
    for item in data:
        url2 = mainSite + '/kreskowka/' + item[0]
        name = item[2].encode("utf-8")
        name = ParseDescription(name)
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''


###
        contextLabs = {
            'title': name,
            'year': '0000',
            'url': url2,
            'img': img,
            'fanart': fanart,
            'DateAdded': '',
            'plot': labs['plot']
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlayAnimekresk',
            'site': site,
            'section': section,
            'title': name,
            'url': url2,
            'img': img,
            'fanart': fanart
        }
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    eod()
Exemplo n.º 24
0
def Browse_EpisodesSenpai(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = GetDataBeetwenMarkers(nURL(url),
                                 '<div class="collection row anime-col">',
                                 '<footer class="page-footer indigo">',
                                 False)[1]
    data = re.findall('href="/anime/(.+?)">', html)
    ItemCount = len(data)
    for item in data:
        url2 = mainSite + item
        name = (urllib2.unquote(item).replace('/', ' - ')).encode("utf-8")
        name = ParseDescription(name)
        img = ""
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        contextLabs = {
            'title': name,
            'year': '0000',
            'url': url2,
            'img': img,
            'fanart': fanart,
            'DateAdded': '',
            'plot': labs['plot']
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlaySenpai',
            'site': site,
            'section': section,
            'title': name,
            'url': url2,
            'img': img,
            'fanart': fanart
        }
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)


# next page
#    npage = url[:-1] + str(int(url[-1:]) + 1)
#    if -1 != html.find("do strony "):
#        _addon.add_directory({'mode': 'EpisodesAnime', 'site': site, 'section': section, 'url': npage, 'page': npage}, {'title': "Next page"}, is_folder=True, fanart=fanartAol, img=nexticon)
    eod()
def Browse_ItemsDramaQueen_drama(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    idx = html.find("<div id='main' data-scroll-offset='88'>")
    if idx == -1:
        return
    idx2 = html.find('<span class="seperator extralight-border">', idx)
    if idx2 == -1:
        return
    html = html[idx:idx2]
    html = html.replace("\"", "\'")
    r = re.compile("uploads(.+?)'(.+?)href='(.+?)' title='(.+?)'>").findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for img, xxx, _url, _name in r:
            strona = _url
            _name2 = _name
            html2 = nURL(strona)
            image = re.compile("<img src='http://www.dramaqueen.pl/wp-content/uploads/(.+?)' width").findall(html2)
            ItemCount = len(image)
            if len(image) > 0:
                for foto in image:
                    fanart = "http://www.dramaqueen.pl/wp-content/uploads/" + foto
            else:
                    fanart = ""
            img = "http://www.dramaqueen.pl/wp-content/uploads/" + img
#szukanie opisu
            idx = html2.find('<footer class="entry-footer"></footer></article>')
            if idx == -1:
                return
            idx2 = html2.find('</div>    </div>', idx)
            if idx2 == -1:
                return
            desc = html2[idx:idx2]
            desc = desc.replace("\n", "")
            opis = re.compile('itemprop="text" ><p><em>(.+?)</em></p>').findall(desc)
            ItemCount = len(opis)
            if len(opis) > 0:
                for desc in opis:
                    plot = clean_html(desc)
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
            pars = {'mode': 'EpisodesDramaQueen_drama', 'site': site, 'section': section, 'title': _name2, 'url': strona, 'img': img, 'fanart': fanart}
            contextLabs = {'title': _name2, 'url': strona, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
            if   section == 'movie':
                contextMenuItems = ContextMenu_Movies(contextLabs)
            elif section == 'Dramadrama':
                contextMenuItems = ContextMenu_Series(contextLabs)
            else:
                contextMenuItems = []
            labs['title'] = _name2
            _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, view_mode=addst('tvshows-view'))
def MenuDevFeatured(data=[]):
	#data.append(['pars',{},'labs',{u'plot':'',u'title':''}])
	#data.append()
	iC=len(data)
	for (tag1,pars,tag2,labs) in data:
		img=pars['img']; fimg=pars['fimg']; #debob(['pars',pars,'labs',labs]); 
		try: _addon.add_directory(pars,labs,is_folder=False,fanart=fimg,img=img,total_items=iC,context_replace=False)
		except: pass
	#set_view('list',view_mode=addst('default-view')); eod()
	set_view('tvshows',view_mode=addst('tvshows-view')); eod()
Exemplo n.º 27
0
def Browse_LatestEpisodes(mmurl):
	url_content=nURL(mainSite); les=re.search(r"(?s)<h4>Latest Episodes</h4>(.+?)<h4", url_content).group(1); les=_addon.unescape(les); les=unescape(les)
	from universal import _common
	les=_common.str_conv(les)
	for le in re.finditer(r'<li.+?class="(.+?)".+?<a.+?href="(.+?)".+?<img.+? src="(.+?)".+?title">(.+?)</div>', les):
		le_typ=le.group(1); le_url=le.group(2); le_img=le.group(3); le_ttl=le.group(4)
		contextLabs={'title':le_ttl,'year':'0000','url':le_url,'img':le_img,'fanart':le_img,'DateAdded':'','type':le_typ}; contextMenuItems=ContextMenu_Episodes(labs=contextLabs)
		try: _addon.add_directory({'mode':'Hosts','site':site,'section':section,'title':le_ttl,'url':le_url,'fanart':le_img,'img':le_img},{'title':cFL_(le_ttl,colors['6'])},is_folder=True,fanart=le_img,img=le_img,contextmenu_items=contextMenuItems)
		except: t=''
	set_view('episodes',int(addst('episode-view'))); eod()
Exemplo n.º 28
0
def MenuDevFeatured(data=[]):
	#data.append(['pars',{},'labs',{u'plot':'',u'title':''}])
	#data.append()
	iC=len(data)
	for (tag1,pars,tag2,labs) in data:
		img=pars['img']; fimg=pars['fimg']; #debob(['pars',pars,'labs',labs]); 
		try: _addon.add_directory(pars,labs,is_folder=False,fanart=fimg,img=img,total_items=iC,context_replace=False)
		except: pass
	#set_view('list',view_mode=addst('default-view')); eod()
	set_view('tvshows',view_mode=addst('tvshows-view')); eod()
Exemplo n.º 29
0
def Browse_Page(url,page='',metamethod=''):
	if url=='': return
	if len(page) > 0: p='/'+page; npage=str(int(page)+1)
	else: p=''; npage='2'
	deb('url and page',url+p)
	html=nURL(url+p)
	if (len(html)==0): return
	if '">Next</a></li>' in html: _addon.add_directory({'mode':'Page','site':site,'section':section,'url':url,'page':npage},{'title':cFL_('  .Next Page > '+npage,colors['2'])},is_folder=True,fanart=fanartSite,img=iconSite)
	Browse_Items(html,metamethod)
	eod()
Exemplo n.º 30
0
def ListNoCat(url, title):
    if len(url) == 0: return
    if mainSite not in url: url = mainSite + url
    deb('url', url)
    html = (messupText(nURL(url), True, True))
    deb('length of html', str(len(html)))
    #debob(html)
    #html=spAfterSplit(html,'<ul id="videoList_ul">'); html=spBeforeSplit(html,'</ul>');
    if len(html) == 0: return
    s = '{ value: "(http://www.kindertube.nl/(.+?)/.+?.html)", label: "(.+?)" },'
    matches2 = re.compile(s).findall(html)
    deb('# of matches found', str(len(matches2)))
    debob(matches2)
    if len(matches2) > 0:
        i = len(matches2)
        for mUrl, mFolder, name in matches2:
            debob((mUrl, name))
            img = artj('noimage2')
            labs = {
                'title': '' + cFL(name, 'darkorange')
            }  #+'[CR]'+''+mUrl+'' #img=iconSite;
            try:
                #if '<a href="'+mUrl+'" style="text-decoration: none"><img src="' in html: print '" style="text-decoration: none"><img src="'
                img = re.compile(
                    '<a href="' + mUrl +
                    '" style="text-decoration: none"><img src="(.+?)"'
                ).findall(html)[0]
                #debob(img);
                labs = {
                    'title': '' + cFL(name, 'white')
                }
                deb('image found', img)
            except:
                pass
            p = mFolder
            if img == artj('noimage2'):
                img = 'http://www.kindertube.nl/images/' + p + '-logo.gif'
            pars = {
                'mode': 'ListEpisodes',
                'img': img,
                'url': mUrl,
                'title': name,
                'site': site
            }
            try:
                _addon.add_directory(pars,
                                     labs,
                                     is_folder=True,
                                     fanart=fanartSite,
                                     img=img,
                                     total_items=i)
            except:
                pass
    set_view('episodes', view_mode=addst('episode-view'))
    eod()
Exemplo n.º 31
0
def Browse_Itemdragon(html, url, metamethod='', content='movies', view='515'):
    if (len(html) == 0):
        return
    html = GetDataBeetwenMarkers(html, '<ul class="lista-odcinkow">',
                                 '<div class="kontener">')[1]
    data = re.findall('<li>(.+?)</li>\n<li><a href="(.+?)">(.+?)</a>', html)
    ItemCount = len(data)
    for item in data:
        strona = mainSite + item[1]
        name = item[0] + " - " + item[2]
        name = name.encode("utf-8")
        img = ''
        plot = ''
        fanart = fanartAol
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''


###
        pars = {
            'mode': 'Playdragon',
            'site': site,
            'section': section,
            'title': name,
            'url': strona,
            'img': img,
            'fanart': fanart
        }
        contextLabs = {
            'title': name,
            'url': strona,
            'img': img,
            'fanart': fanart,
            'todoparams': _addon.build_plugin_url(pars),
            'site': site,
            'section': section,
            'plot': labs['plot']
        }
        if section == 'dragonball':
            contextMenuItems = ContextMenu_Series(contextLabs)
        else:
            contextMenuItems = []
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    set_view(content, view_mode=addst('tvshows-view'))
def Browse_Itemscen(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    r = re.compile('<a href="http://anime-centrum.net/(.+?)" class="tip-(.+?) tip-style-2"').findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for _url, _x in r:
            strona = 'http://anime-centrum.net/' + _url
            html2 = nURL(strona)
#  nazwa
            tytul = re.compile('<meta property="og:title" content="(.+?)" />').findall(html2)
            ItemCount = len(tytul)
            if len(tytul) > 0:
                for _tytul in tytul:
                    _name2 = _tytul.encode('utf-8')
#  grafika
            image = re.compile('<meta property="og:image" content="(.+?)" />').findall(html2)
            ItemCount = len(image)
            if len(image) > 0:
                for foto in image:
                    img = foto
            else:
                img = ""
#  fanart
            image3 = re.compile('http:(.+?).jpg').findall(html2)
            ItemCount = len(image3)
            if len(image3) > 0:
                for foto3 in image3:
                    fanart = "http:" + foto3 + ".jpg"
            else:
                    fanart = img
#  opis
            opis = re.compile('<strong>Opis:</strong>(.+)').findall(html2)
            ItemCount = len(opis)
            if len(opis) > 0:
                for desc in opis:
                    plot = desc
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
###
            pars = {'mode': 'EpisodesCentrum', 'site': site, 'section': section, 'title': _name2, 'url': strona, 'img': img, 'fanart': fanart}
            contextLabs = {'title': _name2, 'url': strona, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
            if   section == 'movie':
                contextMenuItems = ContextMenu_Movies(contextLabs)
            elif section == 'animecentrum':
                contextMenuItems = ContextMenu_Series(contextLabs)
            else:
                contextMenuItems = []
            labs['title'] = _name2
            _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, view_mode=addst('tvshows-view'))
def Browse_EpisodesDramaQueen_drama(url,page='',content='episodes',view='515'):
    html = gethtml2.get(url, addonPath)
    html = messupText(html, ciastko, True, True)
    idx = html.find('<div class="togglecontainer toggle_close_all')
    if idx == -1:
        return
    idx2 = html.find("</div></div></div>", idx)
    if idx2 == -1:
        return
    html2 = html[idx:idx2]
    html2 = html2.replace("\n", "")
    html2 = html2.replace("#038;", "")
    html2 = html2.replace("&hd=3", "")
    s = '>Odcinek(.+?)<(.+?)src="(.+?)"'
    matches = re.compile(s).findall(html2)
    ItemCount = len(matches)
    if ItemCount > 0:
        for _name, xxx, _url in matches:
            _url2 = _url
            _name = "Odcinek" + _name
            _title = _name
            strona = _url2
            image = re.compile("<img src='http://www.dramaqueen.pl/wp-content/uploads/(.+?)' width").findall(html)
            ItemCount = len(image)
            if len(image) > 0:
                for foto in image:
                    fanart = "http://www.dramaqueen.pl/wp-content/uploads/" + foto
            else:
                    fanart = ""
            img = fanart
#wyciąganie opisu
            idx = html.find('itemprop="text" ><p><em>')
            if idx == -1:
                return
            idx2 = html.find("</em></p>", idx)
            if idx2 == -1:
                return
            plot = html[idx:idx2]
            plot = plot.decode("utf-8")
            plot = clean_html(plot)
            plot = plot.replace('itemprop="text" >', '')
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''

            contextLabs = {'title': _name, 'year': '0000', 'url': _url2, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name, 'url': strona, 'img': img, 'fanart': fanart}
            labs['title'] = _title
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
def Browse_AZ():
###Diff-Anime###
    if section == 'diffanime':
        tUrl = mainSite + 'lista-anime'
        _addon.add_directory({'mode': 'Page', 'site': site, 'section': section, 'url': tUrl + '?letter=0&rowstart=00'}, {'title': '#'}, is_folder=True, fanart=fanartSite, img=addonPath + '/art/znak.png')
        for az in MyAlphabet:
            _addon.add_directory({'mode': 'Page', 'site': site, 'section': section, 'url': tUrl + '?letter='+ az + '&rowstart=00' }, {'title': az}, is_folder=True, fanart=fanartSite, img=addonPath + '/art/'+ az +'.png')
        if (len(addst('username' '')) == 0) or (len(addst('password', '')) == 0):
            d = xbmcgui.Dialog()
            d.ok('Komunikat', "Musisz się zalogować, aby móc oglądać odcinki.")
    set_view('list', view_mode=addst('default-view'))
    eod()
Exemplo n.º 35
0
def Browse_Episodeswijam(url, page, content='episodes', view='515'):
    if url == '':
        return
    if 'blackclover'in url:
        html = nURL(url)
    else:
        html = nURL(url)
        html = html.encode('utf-8', '')
    if ('kolejnosc_ogladania.html' in html):
        data = GetDataBeetwenMarkers(html, 'html">Kolejność oglądania</a></li>', '</ul>', False)[1]
        data = re.findall('<a href="(.+?)">(.+?)</a>', data)
        ItemCount = len(data)
        if len(data) > 0:
            for item in data:
                strona = url + item[0]
                name = item[1]
                img = ''
                plot = ''
                fanart = fanartAol
                labs = {}
                try:
                    labs['plot'] = plot
                except:
                    labs['plot'] = ''
                pars = {'mode': 'Browse_Episodeswijaminne2', 'site': site, 'section': section, 'title': name, 'url': strona, 'page': url, 'img': img, 'fanart': fanart}
                contextLabs = {'title': name, 'url': strona, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
                contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
                labs['title'] = name
                _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
            eod()
    else:
        html2 = GetDataBeetwenMarkers(html, '<div class="pmenu_naglowek_red">Odcinki anime online</div>', '</ul>', False)[1]
        data = re.findall('<a href="(.+?)">(.+?)</a>', html2)
        ItemCount = len(data)
        if len(data) > 0:
            for item in data:
                strona = url + item[0]
                name = item[1]
                img = ''
                plot = ''
                fanart = fanartAol
                labs = {}
                try:
                    labs['plot'] = plot
                except:
                    labs['plot'] = ''
                pars = {'mode': 'Browse_Episodeswijaminne2', 'site': site, 'section': section, 'title': name, 'url': strona, 'page': url, 'img': img, 'fanart': fanart}
                contextLabs = {'title': name, 'url': strona, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
                contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
                labs['title'] = name
                _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
        eod()
Exemplo n.º 36
0
def iLiveBrowse(channel,iLive_Sort,iLive_Language):
	if len(iLive_Sort)==0: iLive_Sort="0"
	#channel=channel.replace(" ","%20"); 
	### \/ Catching the first page.
	tUrl="http://www.ilive.to/channels/"+channel.replace(" ","%20")+"?sort="+iLive_Sort+"&lang="+iLive_Language; deb("url",tUrl); 
	html=nURL(tUrl); deb("length of first page",str(len(html))); 
	### \/ Catching the rest of the pages.
	if '<p align="center" class="pages"><strong>Page: </strong>' in html:
		phtml=html.split('<p align="center" class="pages"><strong>Page: </strong>')[1].split('</span></p>')[0]; deb("length of phtml",str(len(phtml))); 
		try: ppages=re.compile('<a href="(http://www.ilive.to/channels/.+?)">\s*(\d+)\s*</a>').findall(phtml)
		except: ppages=[]
		deb("number of pages",str(len(ppages)+1)); debob(ppages); 
		dialogWait=xbmcgui.DialogProgress(); loaded=1; ptotal=len(ppages)+1; ret=dialogWait.create('Please wait...'); 
		percent=(loaded * 100)/ptotal; remaining_display='[B]Page '+str(loaded)+' of '+str(ptotal)+'[/B].'; dialogWait.update(percent,'[B]Loading Pages...[/B]',remaining_display); 
		for (ppage,pname) in ppages: 
			time.sleep(1); html+=nURL(ppage.replace(" ","%20")); 
			loaded=loaded+1; percent=(loaded * 100)/ptotal; remaining_display='[B]Page '+str(loaded)+' of '+str(ptotal)+'[/B].'; dialogWait.update(percent,'[B]Loading Pages...[/B]',remaining_display); 
		dialogWait.close(); del dialogWait
	### \/ Catching Items.
	html=nolines(messupText(html.replace("&nbsp;",""),True,True)); 
	deb("length of all pages",str(len(html))); 
	###s='src=".+?" alt=".+?<img width=".+?" height=".+?" src="([^<]+)" alt=".+?"/></noscript></a><a href="(.+?)"><strong>(.+?)</strong></a><br/>.+?<a href="http://[A-Za-z0-9\.]*/channels\?lang=\d*">([A-Za-z]*)</a>\s*</li>'; 
	###s='src=".+?" alt=".+?
	##s='<img width=".+?" height=".+?" src="(http://snapshots.ilive.to/snapshots/[0-9a-zA-Z]+_snapshot.[jpg|png]+)" alt=".+?"/></noscript></a><a href="(.+?)"><strong>(.+?)</strong></a><br/>.+?'; 
	##s+='<span class="viewers">(.*?)</span>\s*'; s+='<span class="totalviews">(.*?)</span><br/>\s*'; 
	##s+='<a href="http://[A-Za-z0-9\.]*/channels/[A-Za-z\s]*">([A-Za-z0-9\s]*)</a>\s*'; 
	##s+='<a href="http://[A-Za-z0-9\.]*/channels\?lang=\d*">([A-Za-z0-9\s]*)</a>\s*</li>'; 
	#'src=".+?" alt=".+?<img width=".+?" height=".+?" src="([^<]+)" alt=".+?"/></noscript></a><a href="(.+?)"><strong>(.*?)</strong></a><br/>'
	s='<noscript><img width="\d+" height="\d+" src="(http://snapshots.ilive.to/snapshots/[0-9a-zA-Z]+_snapshot.jpg)" alt=".+?"\s*/></noscript>\s*</a>\s*\n*\s*'; 
	s+='<a href="(http://www.ilive.to/view/\d+/.+?)"><strong>\s*(.+?)\s*</strong></a><br/>\s*'; 
	s+='<span class="viewers">([0-9\,]+)</span>\s*'; 
	s+='<span class="totalviews">([0-9\,]+)</span><br/>\s*'; 
	s+='<a href="http://www.ilive.to/channels/.+?">([A-Za-z0-9\s]*)</a>\s*'; 
	s+='<a href="http://www.ilive.to/channels\?lang=\d*">([A-Za-z0-9\s]*)</a>\s*</li>'; 
	#debob(html); 
	match=re.compile(s).findall(html); ItemCount=len(match); 
	debob(match); 
	#match=sorted(match, key=lambda item: item[2], reverse=False)
	#match=sorted(match, key=lambda item: item[3], reverse=False)
	### \/ Links
	for thumb,url,name,iViewers,iTotalViews,Category,lang in match:
		unCacheAnImage(thumb); 
		pars={'mode':'iLivePlay','site':site,'section':section,'title':name,'url':url,'fanart':thumb,'img':thumb}; 
		PlotD=cFL("[CR]Language: "+lang+"[CR]Category: "+Category+"[CR]Viewers: "+iViewers+"[CR]TotalViews: "+iTotalViews,"tan"); 
		try: _addon.add_directory(pars,{'title':name+'  ['+cFL(lang,colors['6'])+']','plot':PlotD},is_folder=False,fanart=thumb,img=thumb,total_items=ItemCount)
		except: pass
	
	###
	set_view('movies',view_mode=addst('movies-view')); 
	#set_view('tvshows',view_mode=addst('tvshows-view')); 
	#set_view('list',view_mode=addst('default-view')); 
	eod(); 
Exemplo n.º 37
0
def Browse_ItemRecenzje(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    html = GetDataBeetwenMarkers(html, '<div class="yt-lockup-content">',
                                 '<span class="yt-spinner">', False)[1]
    data = re.findall(
        'href="(.+?)">(.+?)</a><span class="accessible-description"', html)
    ItemCount = len(data)
    for item in data:
        strona = 'plugin://plugin.video.youtube/?action=play_video&videoid=%s' % item[
            0].replace('/watch?v=', '')
        name = item[1].encode("ascii", 'replace')
        fanart = fanartAol
        img = 'https://i.ytimg.com/vi_webp/' + item[0].replace(
            '/watch?v=', '') + '/mqdefault.webp'
        plot = ''
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
        contextLabs = {
            'title': name,
            'year': '0000',
            'url': strona,
            'img': img,
            'fanart': fanart,
            'DateAdded': '',
            'plot': labs['plot']
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlayFromHost',
            'site': site,
            'section': section,
            'title': name,
            'url': strona,
            'img': img,
            'fanart': fanart
        }
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
def MenusBrowser(Url='/browse',zz=[],NewMode='BrowseCat3'):
	#zz=MenuBrowse_FetchCats(Url)
	zz.append("Misc"); zz.append("People"); zz.append("Nature"); zz.append("Creative"); zz.append("Music Cafe"); zz.append("News & Tech"); zz.append("Lifestyles"); zz.append("Espanol"); 
	#zz.append("Vapers"); zz.append("Breakers"); zz.append("Gamers"); 
	#_addon.add_directory({'mode':NewMode,'site':site,'cat':'','type':'php'},{'title':AFColoring('All')},is_folder=True,fanart=fanartSite,img=(mainSite+'/img/cat_all_white.png'))
	_addon.add_directory({'mode':NewMode,'site':site,'cat':'','type':'php'},{'title':AFColoring('All')},is_folder=True,fanart=fanartSite,img=artj('All'))
	for z in zz: 
		nonTitle=z.lower().replace(' ','').replace('&',''); 
		catName=nonTitle.replace('musiccafe3','music_cafe').replace('newstech','news_tech'); 
		pars={'mode':'BrowseCat3','site':site,'cat':catName,'type':'php'}; 
		img=(mainSite+'/img/cat_%s_white.png'%nonTitle.replace('musiccafe','music')); #img=(mainSite+'/img/cat_%s.png' % nonTitle)
		img=artj(nonTitle)
		_addon.add_directory(pars,{'title':AFColoring(z)},is_folder=True,fanart=fanartSite,img=img); #img=psgn('cat '+z.lower())); 
	set_view('list',view_mode=addst('default-view')); eod()
def SectionMenu():
	cNumber ='8'; cNumber2='2'; cNumber3='4'; 
	_addon.add_directory({'mode':'About','site':site},{'title':cFL_('About',colors['9'])},is_folder=False,fanart=fanartSite,img='http://i.imgur.com/0h78x5V.png') # iconSite
	if isFile(checkedFileWP)==False: _SaveFile(checkedFileWP,'')
	checkedFileList=_OpenFile(checkedFileWP)
	if isFile(workingFileWP)==False: MiscTag='  '+cFL('<<','red')+'  ['+cFL('Use Updater','blue')+']'
	else: MiscTag=''
	_addon.add_directory({'mode':'CustomUpdate','path':'/addon/','filename':workingFile,'url':workingFile,'site':site},{'title':cFL(cFL_('Click to update the data file for updates.'+MiscTag,colors['9']),colors['0'])+'[CR][May Take a few moments.]'},is_folder=False,fanart=fanartSite,img=iconSite)
	if isFile(workingFileWP)==True: _addon.add_directory({'mode':'TextBoxFile','url':workingFileWP,'title':cFL('Updates',colors['9'])},{'title':cFL_('Read Update\' documentation',colors[cNumber2])},is_folder=False,fanart=fanartSite,img=iconSite)
	#DownloadThis(workingUrl+workingFile,workingFile,_addonPath,useResolver=False)
	#if isFile(workingFileWP)==False: DownloadThis(workingUrl+workingFile,workingFile,_addonPath,useResolver=False)
	if isFile(workingFileWP)==True:
		dd=_OpenFile(workingFileWP)
		debob(dd)
		s="'(.*?)'\s*:\s*'([A-Za-z0-9\.\-_\[\]\(\)]*)'"; 
		try: matches=re.compile(s).findall(dd) #,re.DOTALL
		except: matches=''
		ItemCount=len(matches)
		if ItemCount > 0:
			debob(matches)
			for _path,_name in matches:
				if not _name in checkedFileList:
					img=iconSite; fimg=fanartSite; 
					_title=cFL(_name,colors[cNumber])+CR+' ['+_path+']'
					pars={'mode':'CustomUpdate','path':_path,'filename':_name,'site':site,'section':section,'url':_name}
					_addon.add_directory(pars,{'title':_title},is_folder=False,fanart=fimg,img=img,total_items=ItemCount)
		#
	#
	#
	eod()
Exemplo n.º 40
0
def MenusBrowser(Url='/browse',zz=[],NewMode='BrowseCat3'):
	#zz=MenuBrowse_FetchCats(Url)
	zz.append("Misc"); zz.append("People"); zz.append("Nature"); zz.append("Creative"); zz.append("Music Cafe"); zz.append("News & Tech"); zz.append("Lifestyles"); zz.append("Espanol"); 
	#zz.append("Vapers"); zz.append("Breakers"); zz.append("Gamers"); 
	#_addon.add_directory({'mode':NewMode,'site':site,'cat':'','type':'php'},{'title':AFColoring('All')},is_folder=True,fanart=fanartSite,img=(mainSite+'/img/cat_all_white.png'))
	_addon.add_directory({'mode':NewMode,'site':site,'cat':'','type':'php'},{'title':AFColoring('All')},is_folder=True,fanart=fanartSite,img=artj('All'))
	for z in zz: 
		nonTitle=z.lower().replace(' ','').replace('&',''); 
		catName=nonTitle.replace('musiccafe3','music_cafe').replace('newstech','news_tech'); 
		pars={'mode':'BrowseCat3','site':site,'cat':catName,'type':'php'}; 
		img=(mainSite+'/img/cat_%s_white.png'%nonTitle.replace('musiccafe','music')); #img=(mainSite+'/img/cat_%s.png' % nonTitle)
		img=artj(nonTitle)
		_addon.add_directory(pars,{'title':AFColoring(z)},is_folder=True,fanart=fanartSite,img=img); #img=psgn('cat '+z.lower())); 
	set_view('list',view_mode=addst('default-view')); eod()
Exemplo n.º 41
0
def Browse_Episodes4fun(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    html = GetDataBeetwenMarkers(html, '<div class="list_episode">',
                                 '</section>', False)[1]
    data = re.findall('<a href="(.+?)" title="(.+?)">', html)
    ItemCount = len(data)
    for item in data:
        strona = item[0]
        name = item[1]
        plot = ''
        img = ''
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''


###
        contextLabs = {
            'title': name,
            'year': '0000',
            'url': strona,
            'img': img,
            'fanart': fanart,
            'DateAdded': '',
            'plot': labs['plot']
        }
        contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
        pars = {
            'mode': 'PlayAnime4fun',
            'site': site,
            'section': section,
            'title': name,
            'url': strona,
            'img': img,
            'fanart': fanart
        }
        labs['title'] = name
        _addon.add_directory(pars,
                             labs,
                             is_folder=False,
                             fanart=fanart,
                             img=img,
                             contextmenu_items=contextMenuItems,
                             total_items=ItemCount)
    set_view(content, view_mode=addst('links-view'))
    eod()
def Browse_EpisodesShniden(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    idx = html.find('><div id="news-id')
    if idx == -1:
        return
    idx2 = html.find('</td>', idx)
    if idx2 == -1:
        return
    htmllink = html[idx:idx2]
    r = re.compile('<a href=".+?(/.+?.html)".+?>(?:<b>)*(.+?)(?:</b>)*</a>').findall(htmllink)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url, _tytul in r:
            _name = _tytul
            _url =  'http:' + _url
            _title = _name
#            image = re.compile("<img src='http://(.+?)' style='margin:2px").findall(html)
 #           ItemCount = len(image)
  ##             for foto in image:
    #                img = "http://" + foto
     #       else:
      #          image = re.compile("<img src='(.+?)' style='margin:").findall(html)
       #         ItemCount = len(image)
        ####     else:
            #        img = ""
            img = ''
            fanart = fanartAol
#            opis = re.compile('<font face="Trebuchet MS">(.+?)</font>').findall(html)
#            ItemCount = len(opis)
#            if len(opis) > 0:
#                for desc in opis:
            plot = ""
            strona = _url
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
###
            contextLabs = {'title': _name, 'year': '0000', 'url': _url, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayShniden', 'site': site, 'section': section, 'title': _name, 'url': strona, 'img': img, 'fanart': fanart}
            labs['title'] = _title
            _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Exemplo n.º 43
0
def SpecialMenu(url):
	try: 
		if not '://' in url: html=common._OpenFile(TPapp(url))
		else: html=nURL(url)
		html=html.replace('\n','').replace('\r','').replace('\a','').replace('\t',''); data=eval(html); 
	except: data=[]
	iC=len(data); 
	if iC > 0:
		for (tag1,pars,tag2,labs) in data:
			img=pars['img'].replace('https://','http://'); fimg=pars['fimg'].replace('https://','http://'); 
			if fimg.lower()=='[fanart]': fimg=fanartSite
			debob(['pars',pars,'labs',labs]); 
			try: _addon.add_directory(pars,labs,is_folder=False,fanart=fimg,img=img,total_items=iC,context_replace=False)
			except: pass
	#set_view('list',view_mode=addst('default-view')); eod()
	set_view('tvshows',view_mode=addst('tvshows-view')); eod()
Exemplo n.º 44
0
def ListShows():
	html=messupText(nURL(mainSite2+'/video'),True); deb('length of html',str(len(html))); #debob(html)
	html=spAfterSplit(html,'<ul id="channelCarousel_ul">'); html=spBeforeSplit(html,'</ul>'); 
	if len(html)==0: return
	s='<li class="channelCarousel_li channelCarousel_li_\d+ rollover">\s*\n*\s*'
	s+='<a href="(/video/.+?)" title=".*?">\s*\n*\s*'
	#s+='<img height="80" width="95" border="0" alt="(.*?)" src="(/images/touts/video_channel_thumbs/.+?.jpg)"/>\s*\n*\s*</a>\s*\n*\s*</li>'
	s+='<img height="\d+" width="\d+" border="0" alt="(.*?)" src="(/images/touts/video_channel_thumbs/.+?.jpg)"/>\s*\n*\s*</a>\s*\n*\s*</li>'
	matches=re.compile(s).findall(html); deb('# of matches found',str(len(matches))); #debob(matches)
	if len(matches)==0: return
	for (_url,_name,img) in matches:
		img=mainSite2+img; _url=mainSite2+_url; #debob([_name,_url,img]); 
		_title=cFL_(_name,colors['5'])
		try: _addon.add_directory({'mode':'ListEpisodes','url':_url,'title':_name,'site':site},{'title':_title},is_folder=True,fanart=fanartSite,img=img)
		except: pass
	set_view('tvshows',view_mode=addst('tvshows-view')); eod()
Exemplo n.º 45
0
def Browse_Aktualnosci(html, metamethod='', content='tvshows', view='515'):
    if (len(html) == 0):
        return
    r = re.compile("<div class='head'><h2><a href='/news/(.+?)'>(.+?)</a>").findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for _url, _name in r:
            strona = 'http://diff-anime.pl' + '/news/' + _url
            html2 = nURL(strona)
            _name2 = clean_html(_name)
            _name2 = _name.replace(";", "")
#
            idx = html2.find("class='news-category' />")
            if idx == -1:
                return
            idx2 = html2.find("</div>", idx)
            if idx2 == -1:
                return
            plot = html2[idx:idx2]
            plot = clean_html(plot)
            plot = plot.replace("class='news-category' />", "")

#
            image = re.compile("<div class='content'><img src='(.+?)' alt='(.+?)' class='news-category' />(.+?).<br />").findall(html2)
            ItemCount = len(image)
            if len(image) > 0:
                for foto, plot1, plot2 in image:
                    img = "http://diff-anime.pl" + foto
            fanart = fanartSite
            labs = {}
            try:
                labs['plot'] = plot
            except:
                labs['plot'] = ''
# YOUTUBE LINK
            _link = re.compile('src="//www.youtube.com/embed/(.+?)"').findall(html2)
            ItemCount = len(_link)
            if len(_link) > 0:
                for link in _link:
                    _url = 'plugin://plugin.video.youtube/?action=play_video&videoid=%s' % link
            contextLabs = {'title': _name2, 'year': '0000', 'url': strona, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': labs['plot']}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': _name2, 'url': _url, 'img': img, 'fanart': fanart}
            labs['title'] = _name2
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('tvshows-view')))
    eod()
Exemplo n.º 46
0
def SectionMenu():
    ###Anime-Centrum###
    #        _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animecentrum'}, {'title': cFL('Anime-Centrum', 'blue')}, is_folder=True, fanart=fanartSiteCentrum, img=iconCentrum)
    ###Diff-Anime###
    #        _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'diffanime'}, {'title': cFL('Diff-Anime', 'blue')}, is_folder=True, fanart=fanartSite, img=iconDiff)
    ###DramaQueen###
    #        _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'DramaQueen'}, {'title': cFL('DramaQueen', 'blue')}, is_folder=True, fanart=fanartDrama, img=iconSite)
    ###Anime-Online###
    _addon.add_directory(
        {"mode": "SubMenu", "site": site, "section": "animeonline"},
        {"title": cFL("Anime-Odcinki", "blue")},
        is_folder=True,
        fanart=fanartAol,
        img=iconOdcinki,
    )
    ###Anime-Shinden###
    #        _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animeshinden'}, {'title': cFL('Anime-Shinden', 'blue')}, is_folder=True, fanart=fanartAol, img=iconShniden)
    ###Anime-On###
    #        _addon.add_directory({'mode': 'SubMenu', 'site': site, 'section': 'animeon'}, {'title': cFL('Anime-On', 'blue')}, is_folder=True, fanart=fanartAol, img=iconAnimeon)
    ###Ulubione###
    _addon.add_directory(
        {"mode": "FavoritesList", "site": site, "section": ""},
        {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.1.name"), ps("cFL_color3"))},
        fanart=fanartIPTV,
        img=iconFavs,
    )
    _addon.add_directory(
        {"mode": "FavoritesList", "site": site, "section": "", "subfav": "2"},
        {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.2.name"), ps("cFL_color3"))},
        fanart=fanartIPTV,
        img=iconFavs,
    )
    _addon.add_directory(
        {"mode": "FavoritesList", "site": site, "section": "", "subfav": "3"},
        {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.3.name"), ps("cFL_color3"))},
        fanart=fanartIPTV,
        img=iconFavs,
    )
    _addon.add_directory(
        {"mode": "FavoritesList", "site": site, "section": "", "subfav": "4"},
        {"title": cFL_(ps("WhatRFavsCalled") + addst("fav.tv.4.name"), ps("cFL_color3"))},
        fanart=fanartIPTV,
        img=iconFavs,
    )
    set_view("list", view_mode=addst("default-view"))
    eod()
Exemplo n.º 47
0
def Browse_Version(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    html = GetDataBeetwenMarkers(html, "<div class='version-list'>", "</ul>", False)[1]
    data = re.findall("<li><a href='(.+?)'>(.+?)</a><li>", html)
    ItemCount = len(data)
    for item in data:
        url = mainSite + item[0].replace('http://animeon.pl/', '')
        print url
        name = item[1]
        print name
        fanart = fanartAol
        plot = ""
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
        html = nURL(url)
        html = GetDataBeetwenMarkers(html, "<div class='float-left player-container'>", "</div>", False)[1]
        data = re.findall("<iframe src='(.+?)' allowfullscreen", html)
        for item in data:
            html = nURL(item)
            data = re.findall("src='(.+?)'", html)
            for item in data:
                url2 = item
                print url2
                if ('video.sibnet.ru' in url2):
                        url2 = url2.replace('swf', 'php')
                elif ('archive.org' in url2):
                        url2 = url2.replace('http:', '')
                        url2 = 'http:' + url2
                elif ('animeon.com.pl/episodes/players/vk.php' in url2):
                        html = nURL(url2)
                        data = re.findall("src='(.+?)'", html)
                        for item in data:
                            url2 = item
###
            contextLabs = {'title': name, 'year': '0000', 'url': url, 'fanart': fanart, 'DateAdded': ''}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayFromHost', 'site': site, 'section': section, 'title': name, 'url': url2, 'fanart': fanart}
            labs['title'] = name
            _addon.add_directory(pars, labs, is_folder=False, fanart=fanart, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('tvshows-view')))
    eod()
Exemplo n.º 48
0
def Browse_Ongoing():
	html=nURL(mainSite); html=messupText(html,True,True); html=spAfterSplit(html,'>Ongoing Anime and Cartoons</h3>'); html=spAfterSplit(html,'<div class="ani-popbox">'); html=spAfterSplit(html,'<ul class="nav nav-list">'); html=spBeforeSplit(html,'</div>'); html=spBeforeSplit(html,'</ul>')
	s='<li><a href="(http://www.cartoon-world.tv/watch/(.+?)/)"><i class="icon-chevron-right"></i>\s*(.+?)\s*<span class="text-.+?">(.+?)</span></a></li>'
	matches=re.compile(s).findall(html); ItemCount=len(matches)
	color_c=colors['5']; color_a=colors['8']
	if ItemCount==0: return
	for _url,_folder,_name,_type in matches:
		fimg='http://www.dubbednetwork.net/static/'+_folder+'.jpg'
		img='http://www.dubbednetwork.net/static/'+_folder+'.jpg'
		if 'anime' in _type.lower(): color_z=color_a
		else: color_z=color_c
		_title=cFL_(''+_name+'  '+cFL('['+_type+']',color_z),color_z)
		pars={'mode':'Episodes','site':site,'section':section,'title':_name,'url':_url,'fanart':fimg,'img':img}
		contextLabs={'title':_name,'year':'0000','url':_url,'img':img,'fanart':fimg,'todoparams':_addon.build_plugin_url(pars),'site':site,'section':section,'plot':''}; contextMenuItems=ContextMenu_Series(contextLabs)
		try: _addon.add_directory(pars,{'title':_title},is_folder=True,fanart=fimg,img=img,contextmenu_items=contextMenuItems,total_items=ItemCount)
		except: t=''
	set_view('tvshows',view_mode=addst('tvshows-view')); eod()
Exemplo n.º 49
0
def Browse_GenreShniden(url, content='episodes'):
    if url == '':
        return
    html = nURL(url)
    r = re.compile(
        '<input id=".+?"  type="checkbox" name="genre.." value="(.+?)">\n(.+?)</label'
    ).findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for title, xx in r:
            _url = mainSite5 + 'animelist/index.php?genre[]=' + title
            _name = title
            print _name
            _title = _name
            img = iconShniden
            labs = {}
            strona = _url
            contextLabs = {
                'title': _name,
                'year': '0000',
                'url': _url,
                'img': img,
                'fanart': fanartAol,
                'DateAdded': ''
            }
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {
                'mode': 'Pageshniden',
                'site': site,
                'section': section,
                'title': _name,
                'url': strona,
                'fanart': fanartAol
            }
            labs['title'] = _title
            _addon.add_directory(pars,
                                 labs,
                                 is_folder=True,
                                 fanart=fanartAol,
                                 img=img,
                                 contextmenu_items=contextMenuItems,
                                 total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()
Exemplo n.º 50
0
def MenuSection():
	#common.check_database() #Checks rather the Database needs initialized or updated.
	##import splash_highway as splash; #splash.do_My_Splash(_addon.get_fanart(),2,False); 
	##splash.do_My_Splash(HowLong=5,resize=False); 
	SpecialCODE=addst('special-code',''); LocalLists=[]; 
	
	try: nURL(mainSite,cookie_file=CookFile,save_cookie=True)
	except: deb("Error","Couldn't save cookie file."); pass
	
	_addon.add_directory({'mode':'MenuTopBar','site':site},{'title':AFColoring('Top Bar')},is_folder=True,fanart=fanartSite,img=psgn('topbar'))
	_addon.add_directory({'mode':'MenuBrowse','site':site},{'title':AFColoring('Browse')},is_folder=True,fanart=fanartSite,img=psgn('browse'))
	
	#_addon.add_directory({'mode':'BrowseCat2','site':site,'cat':'rooms','type':'js|featured'},{'title':AFColoring('Featured')},is_folder=True,fanart=fanartSite,img=psgn('browse featured'))
	#_addon.add_directory({'mode':'MenuSpecial','url':'http://raw.github.com/HIGHWAY99/plugin.stream.vaughnlive.tv/master/lists/DevsFeaturedList.txt','site':site},{'title':AFColoring("Dev's Featured List")},is_folder=True,fanart=fanartSite,img=psgn('browse devs featured'))
	
	LocalLists.append(['MyPicksList.txt','My Picks List','browse my picks list'])
	LocalLists.append(['LocalList.txt','Local List','browse local list'])
	##LocalLists.append(['','','browse'])
	for (urlA,TiTLE,iMg) in LocalLists:
		urlB=TPapp(urlA)
		if isFile(urlB)==True:
			html=common._OpenFile(urlB)
			if len(html) > 10:
				_addon.add_directory({'mode':'MenuSpecial','url':urlA,'site':site},{'title':AFColoring(TiTLE)},is_folder=True,fanart=fanartSite,img=psgn(iconSite)) #iMg
	
	#if SpecialCODE==ps('special-code'):
	#	_addon.add_directory({'mode':'MenuDevFeatured','site':site},{'title':AFColoring("Dev's Featured List[CR][Hard Coded]")},is_folder=True,fanart=fanartSite,img=psgn('browse devs featured'))
	
	#_addon.add_directory({'mode':'Search','site':site,'url':'/search/'},{'title':AFColoring('Search')+cFL(' Channels',colorB)},is_folder=True,fanart=fanartSite,img=psgn('search'))
	#_addon.add_directory({'mode':'Search','site':site,'url':'/search/_s_/users.js'},{'title':AFColoring('Search')+cFL(' People',colorB)},is_folder=True,fanart=fanartSite,img=psgn('search user'))
	#_addon.add_directory({'mode':'History101','site':site,'url':''},{'title':AFColoring('History')+cFL(' 101',colorB)},is_folder=True,fanart=fanartSite,img=psgn('history 101'))
	
	#
	#if SpecialCODE==ps('special-code'):
	#_addon.add_directory({'mode':'FavoritesList','site':site,'section':section             },{'title':cFL(ps('WhatRFavsCalled'),colorA)+cFL(addst('fav.tv.1.name'),colorB)},fanart=fanartSite,img=psgn('favorites 1'))
	#_addon.add_directory({'mode':'FavoritesList','site':site,'section':section,'subfav':'2'},{'title':cFL(ps('WhatRFavsCalled'),colorA)+cFL(addst('fav.tv.2.name'),colorB)},fanart=fanartSite,img=psgn('favorites 2'))
	#_addon.add_directory({'mode':'FavoritesList','site':site,'section':section,'subfav':'3'},{'title':cFL(ps('WhatRFavsCalled'),colorA)+cFL(addst('fav.tv.3.name'),colorB)},fanart=fanartSite,img=psgn('favorites 3'))
	#_addon.add_directory({'mode':'FavoritesList','site':site,'section':section,'subfav':'4'},{'title':cFL(ps('WhatRFavsCalled'),colorA)+cFL(addst('fav.tv.4.name'),colorB)},fanart=fanartSite,img=psgn('favorites 4'))
	#_addon.add_directory({'mode':'FavoritesList','site':site,'section':section,'subfav':'5'},{'title':cFL(ps('WhatRFavsCalled'),colorA)+cFL(addst('fav.tv.5.name'),colorB)},fanart=fanartSite,img=psgn('favorites 5'))
	#_addon.add_directory({'mode':'FavoritesList','site':site,'section':section,'subfav':'6'},{'title':cFL(ps('WhatRFavsCalled'),colorA)+cFL(addst('fav.tv.6.name'),colorB)},fanart=fanartSite,img=psgn('favorites 6'))
	#_addon.add_directory({'mode':'FavoritesList','site':site,'section':section,'subfav':'7'},{'title':cFL(ps('WhatRFavsCalled'),colorA)+cFL(addst('fav.tv.7.name'),colorB)},fanart=fanartSite,img=psgn('favorites 7'))
	###
	#if (len(addst("LastShowListedURL")) > 0): 
	#	pars={'site':site,'section':section,'mode':'ListEpisodes','url':addst("LastShowListedURL"),'title':addst("LastShowListedNAME"),'imdb_id':addst("LastShowListedIMDBID"),'img':addst("LastShowListedIMG"),'fimg':addst("LastShowListedFANART")}; 
	#	title=AFColoring(addst("LastShowListedNAME"))+CR+cFL('[Last Show]',colorA); 
	#	_addon.add_directory(pars,{'title':title},fanart=addst("LastShowListedFANART"),img=addst("LastShowListedIMG"),is_folder=True); 
	#if (len(addst("LastEpisodeListedURL")) > 0): 
	#	pars={'site':site,'section':section,'mode':'GetMedia','url':addst("LastEpisodeListedURL"),'title':addst("LastEpisodeListedNAME"),'imdb_id':addst("LastEpisodeListedIMDBID"),'img':addst("LastEpisodeListedIMG"),'fimg':addst("LastEpisodeListedFANART"),'stitle':addst("LastEpisodeListedSTITLE"),'etitle':addst("LastEpisodeListedETITLE"),'e':addst("LastEpisodeListedEpNo"),'s':addst("LastEpisodeListedSNo"),'e2':addst("LastEpisodeListedEpNo2")}; 
	#	title=AFColoring(addst("LastEpisodeListedNAME"))+CR+cFL('[Last Episode]',colorA); 
	#	_addon.add_directory(pars,{'title':title},fanart=addst("LastEpisodeListedFANART"),img=addst("LastEpisodeListedIMG"),is_folder=True); 
	###
	_addon.add_directory({'mode':'About','site':site,'section':section},{'title':AFColoring('About')},is_folder=True,fanart=fanartSite,img=artj('About')) # 'http://i.imgur.com/0h78x5V.png' # iconSite
	###
	set_view('list',view_mode=addst('default-view')); eod()
Exemplo n.º 51
0
def Pageshniden(url, nmr,  metamethod='', content='tvshows', view='515'):
    if 'search' in url:
        from common import getUserInput
        url = url + getUserInput('Szukaj','')
        html = nURL(url.replace(' ', '+'))
    else:
        html = nURL(url + nmr)
    html = GetDataBeetwenMarkers(html, 'data-view-table-cover', '<nav class="pagination">', False)[1]
    html = html.replace('\r\n', '')
    html = html.replace(' ', '')
    data = re.findall('src="(.+?)"/></td><tdclass="desc-col"><h3><ahref="(.+?)">(.+?)</a></h3>', html)
    ItemCount = len(data)
    for item in data:
        strona = mainSite5 + item[1]
        name = item[2].encode("utf-8")
        img = (mainSite5 + item[0]).replace('/resources/images/100x100/','/resources/images/genuine/')
        img = img.replace('100x100', '225x350')
        plot = ''
        fanart = fanartAol
        labs = {}
        try:
            labs['plot'] = plot
        except:
            labs['plot'] = ''
###
        pars = {'mode': 'EpisodesShniden', 'site': site, 'section': section, 'title': name, 'url': strona, 'img': img, 'fanart': fanart}
        contextLabs = {'title': name, 'url': strona, 'img': img, 'fanart': fanart, 'todoparams': _addon.build_plugin_url(pars), 'site': site, 'section': section, 'plot': labs['plot']}
        if   section == 'movie':
            contextMenuItems = ContextMenu_Movies(contextLabs)
        elif section == 'shnidenodc':
            contextMenuItems = ContextMenu_Series(contextLabs)
        else:
            contextMenuItems = []
        labs['title'] = name
        _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    if not 'search' in url:
        npage = str(int(nmr) + 1)
        print npage
#    if -1 != html.find("do strony "):
        _addon.add_directory({'mode': 'Pageshniden', 'site': site, 'section': section, 'url': url, 'page': url, 'nmr': npage}, {'title': "Next page"}, is_folder=True, fanart=fanartAol, img=nexticon)
    set_view(content, view_mode=addst('links-view'))
    eod()
Exemplo n.º 52
0
def MenuHistory101():
	tab1rows=ps('db channels tags0c'); 
	try:
		r=get_database_all('SELECT %s FROM channels' % (tab1rows)); 
	except: pass
	if r:
		if len(r) > 0:
			iC=len(r); i=0; 
			HistoryCountLimit="20"; #HistoryCountLimit=addst("history101-count"); 
			for k in r[::-1]:
				try:
					debob(['k',k]); 
					cMI=[]; pars={}; labs={}; pageurl=''; url=''; title=''; liVe=''; plot=''; streamtype=''; roomslug=''; roomid=''; img=iconSite; fanart=fanartSite; 
					try: pageurl=urllib.unquote_plus(str(k[0])); 
					except: pass
					try: title=urllib.unquote_plus(str(k[1])); 
					except: pass
					try: streamtype=urllib.unquote_plus(str(k[2])); 
					except: pass
					try: img=urllib.unquote_plus(str(k[4])); 
					except: pass
					try: fanart=urllib.unquote_plus(str(k[5])); 
					except: pass
					try: roomid=urllib.unquote_plus(str(k[6])); 
					except: pass
					try: roomslug=urllib.unquote_plus(str(k[7])); 
					except: pass
					try: url=urllib.unquote_plus(str(k[9])); debob(['url',url]); 
					except: pass
					try: labs[u'plot']=urllib.unquote_plus(str(k[17])); 
					except: labs[u'plot']=''
					labs[u'title']=cFL(title,colorA); 
					if (len(liVe) > 0) and (not str(liVe).lower()=='none'): labs[u'title']=cFL(title+cFL(" ["+cFL(liVe,colorC)+"]",colorB),colorA); 
					pars={'streamurl':str(url),'roomslug':str(roomslug),'fimg':str(fanart),'img':str(img),'title':str(title),'url':str(pageurl),'type':'','live':'History','mode':'PlayStreamUP','roomid':str(roomid),'sourcetype':''}; 
					if (len(url) > 0) and (not str(url).lower()=='none'):
						try: _addon.add_directory(pars,labs,is_folder=False,fanart=fanart,img=img,contextmenu_items=cMI,total_items=iC,context_replace=False); i+=1; 
						except: pass
					if not (HistoryCountLimit=="ALL") and (len(HistoryCountLimit) > 0):
						if i > (int(HistoryCountLimit)-1): break
				except: pass
	set_view('tvshows',view_mode=addst('tvshows-view')); eod()
Exemplo n.º 53
0
def Fav_List(site='',section='',subfav=''):
	debob(['test1',site,section,subfav]); 
	favs=fav__COMMON__list_fetcher(site=site,section=section,subfav=subfav); 
	ItemCount=len(favs); 
	debob('test2 - '+str(ItemCount)); 
	if len(favs)==0: myNote('Favorites','None Found'); eod(); return
	debob(favs); 
	favs=sorted(favs,key=lambda item: (item[0],item[1]),reverse=False); 
	for (_name,_year,_img,_fanart,_Country,_Url,_plot,_Genres,_site,_subfav,_section,_ToDoParams,_commonID,_commonID2) in favs:
		if _img > 0: img=_img
		else: img=iconSite
		if _fanart > 0: fimg=_fanart
		else: fimg=fanartSite
		debob('_ToDoParams'); debob(_ToDoParams)
		pars=_addon.parse_query(_ToDoParams)
		pars[u'fimg']=_fanart; pars[u'img']=_img; 
		#if len(_commonID) > 0: pars['imdb_id']=_commonID
		debob('pars'); debob(pars)
		_title=AFColoring(_name)
		if (len(_year) > 0) and (not _year=='0000'): _title+=cFL('  ('+cFL(_year,'mediumpurple')+')',colorA)
		if len(_Country) > 0: _title+=cFL('  ['+cFL(_Country,'mediumpurple')+']',colorA)
		wwT=_name+" ~~ "; 
		try:
			if visited_check2(wwT)==True: ww=7
			else: ww=6
		except: ww=6
		#try:
		if ww > 1:
			contextLabs={'title':_name,'year':_year,'img':_img,'fanart':_fanart,'country':_Country,'url':_Url,'plot':_plot,'genres':_Genres,'site':_site,'subfav':_subfav,'section':_section,'todoparams':_ToDoParams,'commonid':_commonID,'commonid2':_commonID2}
			##contextLabs={'title':_name,'year':'0000','url':_url,'img':img,'fanart':fimg,'DateAdded':'','todoparams':_addon.build_plugin_url(pars),'site':site,'section':section}
			contextMenuItems=ContextMenu_Favorites(contextLabs)
			contextMenuItems.append( ('Empty List','XBMC.RunPlugin(%s)' % _addon.build_plugin_url({'mode':'cFavoritesEmpty','site':site,'section':section,'subfav':subfav}) ) )
			#contextMenuItems=[]
			_title=wwA(_title,ww); 
			_addon.add_directory(pars,{'title':_title,'plot':_plot},is_folder=True,fanart=fimg,img=img,total_items=ItemCount,contextmenu_items=contextMenuItems)
		#except: pass
		#
	#
	if 'movie' in section.lower(): content='movies'
	else: content='tvshows'
	set_view(content,view_mode=int(addst('tvshows-view'))); eod()
Exemplo n.º 54
0
def SectionMenu():
	vName=''; vPath=''; p=xbmc.Player(); 
	if   (p.isPlayingVideo()==True): pType='Video'; debob("isPlayingVideo"); vPath=addst('download_folder_default',''); 
	elif (p.isPlayingAudio()==True): 
		pType='Audio'; debob("isPlayingAudio"); vPath=addst('download_folder_audio',''); 
		if len(vPath)==0: vPath=addst('download_folder_default',''); 
	elif (p.isPlaying()==True): pType='Unknown'; debob("isPlaying"); vPath=addst('download_folder_default',''); 
	else: pType=''; debob("Couldn't find anything playing."); vPath=addst('download_folder_default',''); 
	try:
		if (p.isInternetStream()==True): iIS=True; deb("isInternetStream()","True"); 
		else: iIS=False; deb("isInternetStream()","False"); 
	except: iIS=True; deb("isInternetStream()","error"); 
	if (len(vPath) > 0) and (len(pType) > 0) and (iIS==True):
		vPath=fixPath(vPath); deb("vPath",vPath); 
		vUrl=xbmc.Player().getPlayingFile(); deb("vUrl",vUrl); 
		vName=setupName(vName,pType); 
		###
		_addon.add_directory({'mode':'Download','url':vUrl,'destfile':vName,'filetype':pType,'destpath':vPath,'site':site,'section':section},{'title':cFL('Download '+str(pType)+': ','firebrick')+cFL(vName,'mediumpurple')+CR+vUrl},is_folder=True,fanart=fanartSite,img=iconSite)
	###
	_addon.add_directory({'mode':'About','site':site,'section':section},{'title':AFColoring('About')},is_folder=True,fanart=fanartSite,img='http://i.imgur.com/0h78x5V.png') # iconSite
	set_view('list',view_mode=addst('default-view')); eod()
Exemplo n.º 55
0
def Browse_PlayShniden(url, page='', content='episodes', view='515'):
    if url == '':
        return
    html = nURL(url)
    r = re.compile('{"online_id":"(.+?)","player":"(.+?)"').findall(html)
    ItemCount = len(r)
    if len(r) > 0:
        for  _url, player in r:
            url = _url
            strona = url
            _name = player
            _title = player
            fanart = fanartAol
            labs = {}
            img=''
            contextLabs = {'title': _name, 'year': '0000', 'url': _url, 'img': img, 'fanart': fanart, 'DateAdded': '', 'plot': ''}
            contextMenuItems = ContextMenu_Episodes(labs=contextLabs)
            pars = {'mode': 'PlayShniden2', 'site': site, 'section': section, 'title': _name, 'url': strona, 'img': img, 'fanart': fanart}
            labs['title'] = _title
            _addon.add_directory(pars, labs, is_folder=True, fanart=fanart, img=img, contextmenu_items=contextMenuItems, total_items=ItemCount)
    set_view(content, int(addst('links-view')))
    eod()