Ejemplo n.º 1
0
def play(p):
    xbmcplugin.setContent(common.addon_handle, 'movie')
    u = p.get('url', '')
    l = common.solveCFP(u)
    if not l == None:
        t = re.compile('<table class=\"table\">(.*?)<\/table>',
                       re.DOTALL).findall(l.text.encode('utf-8'))[0]
        rows = re.compile('(<tr.*?)<\/tr>', re.DOTALL).findall(t)
        players = []
        selList = []
        for r1 in range(len(rows)):
            tds = re.compile('(<td.*?<\/td>)', re.DOTALL).findall(rows[r1])
            pl = re.compile('> (.*?)<\/td>', re.DOTALL).findall(tds[0])[0]
            link = re.compile('<a href=\"(.*?)\" ',
                              re.DOTALL).findall(tds[1])[0]
            kind = re.compile('<td.*?>(.*?)<\/td>',
                              re.DOTALL).findall(tds[3])[0]
            players.append([pl, link])
            selList.append("%s [COLOR lime]%s[/COLOR] | %s" % (pl, kind, link))
        playfrom = xbmcgui.Dialog().select('Wybor zrodla', selList)
        if playfrom >= 0:
            common.log("Wybrano :" + players[playfrom][0] + " - link: " +
                       players[playfrom][1])
            player(players[playfrom])
    else:
        common.info("LINK FEATCHING FAILED", "E404", time=5000)
    xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 2
0
def player(p):
    pl = p[0]
    link = p[1]
    l = common.solveCFP(link)
    stream_url = ''
    if not l == None:
        try:
            iframesrc = re.compile('<iframe src=\"(.*?)\" ',
                                   re.DOTALL).findall(
                                       l.text.encode('utf-8'))[0]
            common.log(l.text.encode('utf-8'))
            if iframesrc.startswith('//'):
                iframesrc = 'http:' + iframesrc
            try:
                stream_url = urlresolve.resolve(iframesrc)
            except Exception, e:
                stream_url = ''
                s = xbmcgui.Dialog().ok(
                    '[COLOR red]Problem[/COLOR]',
                    'Może inny stream_url będzie działał?',
                    'Urlresolver ERROR: [%s]' % str(e))
        except:
            common.log('no iframe found: ' + link)
        if stream_url:
            xbmcplugin.setResolvedUrl(common.addon_handle, True,
                                      xbmcgui.ListItem(path=stream_url))
        else:
            return False
        xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 3
0
def lista(params):
	u=MURL+params.get('url','/titles')
	search=params.get('search',None)
	letter=params.get('letter',None)
	if search=='1':
		p=standardListOptions
		p['search']=xbmcgui.Dialog().input('Wyszukaj..')
		common.log(p['search'])
	else:
		p=standardListOptions
		p['page']=int(params.get('page',1))
		if letter==None:
			letters=['-','1','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
			letter=letters[xbmcgui.Dialog().select('Wybor zrodla',letters)]
		p['letter']='' if letter=='-' else letter
	u+='?'+urllib.urlencode(p)	
	l=common.solveCFP(u)
	if not l==None:
		try:
			m=re.compile('<section class=\"title-table\">.*?<article>(.*?)<\/article>',re.DOTALL).findall(l.text.encode('utf-8'))
			rows=re.compile('<ul class=\"div-row\">(.*?<li class=\"rate-top\" title=\"Ocena TOP\">.*?<\/li>.*?)<\/ul>',re.DOTALL).findall(m[0])
			for r in range(len(rows)):
				img=re.compile('<li class=\"cover-col\">.*?<a href=\"(.*?)\"',re.DOTALL).findall(rows[r])[0]
				title=re.compile('<h3>.*?>(.*?)<\/a>',re.DOTALL).findall(rows[r])[0]
				link=re.compile('<h3>.*?<a href=\"(.*?)\">',re.DOTALL).findall(rows[r])[0]
				tags=string.join(re.compile('<li.*?<a data-tag-id.*?>(.*?)<\/a>',re.DOTALL).findall(rows[r]),',')
				try:
					nEE=re.compile('<li class=\"episodes-col\" title=\"(.*?)\">',re.DOTALL).findall(rows[r])[0]
				except:
					nEE='0 x 0min'
				nE=[re.compile('<li class=\"episodes-col\".*?>(.*?)<',re.DOTALL).findall(rows[r])[0],nEE]
				kind=re.compile('<li class=\"title-kind-col\">(.*?)<',re.DOTALL).findall(rows[r])[0]
				ocena=re.compile('<li class=\"rate-top\".*?>(.*?)<',re.DOTALL).findall(rows[r])[0]
				##addFolder(title,link,img,tags,nE,kind,ocena,sendto)
				## add item
				cm=[]
				cm.append(('Wyświetl opis', 'RunPlugin(%s?mode=shindenpl&action=opis&url=%s)' % (common.sysaddon,urllib.quote_plus(link))))
				
				link+='/all-episodes'
				noe=int(nE[0])
				try:
					dur=int(re.compile('x(.*?)min').findall(nE[1])[0])*60
				except:
					dur=0
				li=xbmcgui.ListItem('[COLOR silver]('+kind+')[/COLOR] '+title+' - [COLOR lime]('+(nE[1] if nE[1] else nE[0])+')[/COLOR]',label2='test',thumbnailImage=MURL+img)
				info={'rating':ocena,'genre':tags,'episode':noe,'duration':dur}
				li.setInfo( type="video", infoLabels = info )
				li.setProperty('IsPlayable', 'true')
				li.setProperty('fanart_image', MURL+img )
				## dodaje menu kontekstowe
				li.addContextMenuItems(cm)
				u=common.sysaddon+"?mode=shindenpl&action=seria&url="+urllib.quote_plus(link)
				xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=u,listitem=li,isFolder=True)
			xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=common.sysaddon+"?mode=shindenpl&action=lista&page="+str(p['page']+1)+"&letter="+letter,listitem=xbmcgui.ListItem("[COLOR gold]>>> DALEJ >>>[/COLOR]"),isFolder=True)
			xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=common.sysaddon+"?mode=shindenpl",listitem=xbmcgui.ListItem("[COLOR gold]>>> MENU <<<[/COLOR]"),isFolder=True)
		except:
			xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=common.sysaddon+"?mode=shindenpl&action=lista",listitem=xbmcgui.ListItem("[COLOR red]-- error --[/COLOR]"),isFolder=True)		
		
	xbmcplugin.setContent(common.addon_handle, 'tvshows')
	xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 4
0
def playEpizod(params):
	xbmcplugin.setContent(common.addon_handle, 'movie')
	u=MURL+params.get('url','')
	l=common.solveCFP(u)
	if not l==None:
		m=re.compile('<table class=\"data-view-table-strips data-view-table-big data-view-hover\">(.*?)<\/table>',re.DOTALL).findall(l.text.encode('utf-8'))[0]
		m1=re.compile('<tbody>(.*?)<\/tbody>',re.DOTALL).findall(m)
		rows=re.compile('<tr>(.*?)<\/tr>',re.DOTALL).findall(m1[0])
		KEY=re.compile("_Storage\.basic =  '(.*?)';",re.DOTALL).findall(l.text.encode('utf-8'))[0]
		XHR=re.compile("_Storage\.XHRService = '\/\/(.*?)';",re.DOTALL).findall(l.text.encode('utf-8'))[0]
		players=[]
		selList=[]
		for r in range(len(rows)):
			pl=re.compile('<td class=\"ep-pl-name\">.*?([\w\s\d]*?)<\/td>',re.DOTALL).findall(rows[r])[0] or 0
			audio=re.compile('<td class=\"ep-pl-alang\">.*?<span class=\"mobile-hidden\">(.*?)<\/span>',re.DOTALL).findall(rows[r])[0] or 0
			subs=re.compile('<td class=\"ep-pl-slang\">.*?<span class=\"mobile-hidden\">(.*?)<\/span>',re.DOTALL).findall(rows[r])[0] or 0
			res=re.compile('<td class=\"ep-pl-res\">.*?<\/span>(.*?)<\/td>',re.DOTALL).findall(rows[r])[0] or 0
			id=re.compile('\"online_id\":\"(.*?)\"',re.DOTALL).findall(rows[r])[0] or 0
			players.append([pl,id])
			selList.append("%s [COLOR blue]%s[/COLOR] A:%s N:%s" % (pl,res,audio,subs))
		playfrom=xbmcgui.Dialog().select('Wybor zrodla',selList)
		if playfrom>=0:
			player(players[playfrom],KEY,XHR)
	else:
		common.info("LINK FEATCHING FAILED","E404", time=5000)
	xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 5
0
def seria(params):
	u=MURL+params.get('url','')	
	l=common.solveCFP(u)
	if not l==None:
		##getEpizodes(s,'playEpizod')
		m=re.compile('<tbody class=\"list-episode-checkboxes\">(.*?)<\/tbody>',re.DOTALL).findall(l.text.encode('utf-8'))
		img=re.compile('<img class=\"info-aside-img\" src=\"(.*?)\"',re.DOTALL).findall(l.text.encode('utf-8'))[0]
		mtitle=re.compile('<h1 class=\"page-title\">Anime: (.*?)<\/h1>').findall(l.text.encode('utf-8'))[0]
		if m:
			rows=re.compile('<tr>(.*?)<\/tr>',re.DOTALL).findall(m[0])
		if rows:
			for r in range(len(rows)):
				nE=re.compile('<td>(\d*?)<\/td>',re.DOTALL).findall(rows[r])[0]
				title=re.compile('<td class=\"ep-title\">(.*?)<\/td>',re.DOTALL).findall(rows[r])[0]
				title2=' | ' if title else ''
				title=mtitle+title2+title
				isOnline=re.compile('<i class=\"fa fa-fw fa-(\w*?)\">',re.DOTALL).findall(rows[r])[0]
				data=re.compile('\"ep-date\">(.*?)<\/td>',re.DOTALL).findall(rows[r])[0]
				link=re.compile('<a href=\"(.*?)\"',re.DOTALL).findall(rows[r])[0]
				addLink(title,nE,link,img,data,'shindenpl&action=playEpizod',isOnline)
	link=params.get('url','').replace("/all-episodes","")				
	u=common.sysaddon+"?mode=shindenpl&action=morelinks&url="+urllib.quote_plus(link)
	xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=u,listitem=xbmcgui.ListItem("[COLOR gold]>>> WIĘCEJ <<<[/COLOR]"),isFolder=True)
	xbmcplugin.setContent(common.addon_handle, 'episodes')		
	xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 6
0
def serial(p):
    xbmcplugin.setContent(common.addon_handle, 'tvshows')
    u = p.get('url', '')
    l = common.solveCFP(u)
    if not l == None:
        try:
            title2 = helpers.PLchar(
                re.compile(
                    '<div class=\"col-sm-9\">.*?<h3 class=\"headline\">(.*?)<\/h3>',
                    re.DOTALL).findall(l.text.encode('utf-8'))[0])
            common.log(title2)
            img = re.compile(
                '<div class=\"col-sm-9\">.*?<img src=\"(.*?)\" alt=\".*?\" class=\"img-responsive\"',
                re.DOTALL).findall(l.text.encode('utf-8'))[0]
            common.log(img)
            episodes = re.compile('<li class=\"episode\">(.*?)<\/li>',
                                  re.DOTALL).findall(l.text.encode('utf-8'))
            common.log(len(episodes))
            lista = []
            for e in range(len(episodes)):
                try:
                    lista.append([
                        helpers.PLchar(
                            re.compile('<a href=.*?>(.*?)<\/a>',
                                       re.DOTALL).findall(episodes[e])[0]),
                        re.compile('<a href=\"(.*?)\">',
                                   re.DOTALL).findall(episodes[e])[0]
                    ])
                except:
                    common.log('przygotowanie listy epizodow')
            lista.sort()

            for e in range(len(lista)):
                try:
                    link = lista[e][
                        1]  #re.compile('<a href=\"(.*?)\">',re.DOTALL).findall(episodes[e])[0]
                    title = lista[e][
                        0]  #helpers.PLchar(re.compile('<a href=.*?>(.*?)<\/a>',re.DOTALL).findall(episodes[e])[0])
                    li = xbmcgui.ListItem(title, thumbnailImage=img)
                    info = {}
                    li.setInfo(type="video", infoLabels=info)
                    li.setProperty('IsPlayable', 'true')
                    li.setProperty('fanart_image', img)
                    u = common.sysaddon + "?mode=alltubepl&action=play&url=" + urllib.quote_plus(
                        link)
                    xbmcplugin.addDirectoryItem(handle=common.addon_handle,
                                                url=u,
                                                listitem=li,
                                                isFolder=False)
                except:
                    common.log('wyswietlenie listy epizodow')
        except:
            xbmcplugin.addDirectoryItem(
                handle=common.addon_handle,
                url=common.sysaddon + "?mode=alltubepl&action=serial",
                listitem=xbmcgui.ListItem("[COLOR red]-- error --[/COLOR]"),
                isFolder=True)
    xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 7
0
def filmy(p):
    xbmcplugin.setContent(common.addon_handle, 'tvshows')
    u = MURL + p.get('url', '/filmy-online')
    page = int(p.get('page', 1))
    u += '/strona[' + str(page) + ']+'
    l = common.solveCFP(u)
    if not l == None:
        try:
            rows = re.compile(
                '<div class=\"item-block clearfix\">.*?<div class=\"row\">.*?(<a href=\".*?<\/a>).*?<\/div>.*?<\/div>',
                re.DOTALL).findall(l.text.encode('utf-8'))
            common.log(len(rows))
            for r in range(len(rows)):
                img = (re.compile('<img src=\"(.*?)\"',
                                  re.DOTALL).findall(rows[r])[0]
                       )  #.replace("thumb","normal")
                title = helpers.PLchar(
                    re.compile('<h3>(.*?)<\/h3>',
                               re.DOTALL).findall(rows[r])[0])
                stitle = re.compile('<div class=\"second-title\">(.*?)<\/div>',
                                    re.DOTALL).findall(rows[r])[0]
                details = helpers.PLchar(
                    re.compile(
                        '<i class=\"fa fa-microphone\".*?>.*?<\/i>(.*?)<i',
                        re.DOTALL).findall(rows[r])[0])
                desc = helpers.PLchar(
                    re.compile('<p .*?>(.*?)<\/p',
                               re.DOTALL).findall(rows[r])[0])
                link = re.compile('<a href=\"(.*?)\">',
                                  re.DOTALL).findall(rows[r])[0]
                li = xbmcgui.ListItem(title + ' - [COLOR lime](' + details +
                                      ')[/COLOR]',
                                      thumbnailImage=img)
                info = {'plotoutline': desc, 'plot': desc}
                li.setInfo(type="video", infoLabels=info)
                li.setProperty('IsPlayable', 'true')
                li.setProperty('fanart_image', img.replace('thumb', 'normal'))
                u = common.sysaddon + "?mode=alltubepl&action=play&url=" + urllib.quote_plus(
                    link)
                xbmcplugin.addDirectoryItem(handle=common.addon_handle,
                                            url=u,
                                            listitem=li,
                                            isFolder=False)
            xbmcplugin.addDirectoryItem(
                handle=common.addon_handle,
                url=common.sysaddon + "?mode=alltubepl&action=filmy&page=" +
                str(page + 1),
                listitem=xbmcgui.ListItem("[COLOR gold]>>> DALEJ >>>[/COLOR]"),
                isFolder=True)
        except:
            xbmcplugin.addDirectoryItem(
                handle=common.addon_handle,
                url=common.sysaddon + "?mode=alltubepl&action=filmy",
                listitem=xbmcgui.ListItem("[COLOR red]-- error --[/COLOR]"),
                isFolder=True)
    xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 8
0
def opis(params):
	u=MURL+params.get('url','')
	l=common.solveCFP(u)
	if not l==None:
		try:
			m=re.compile('<section class=\"info-top\">(.*?)<\/section>',re.DOTALL).findall(l.text.encode('utf-8'))[0]
			opis=re.compile('<div.*?>(.*?)<\/div>',re.DOTALL).findall(m)[0]
			xbmcgui.Dialog().textviewer('Opis',opis)
		except:
			common.log("brak informacji o serii")
			common.info("Problem z pobraniem opisu","BRAK OPISU", time=5000)   
Ejemplo n.º 9
0
def nowe(params):
	u=MURL#+params.get('url','')	
	l=common.solveCFP(u)
	sezon=None
	if not l==None:
		m=re.compile('<section class=\".*box-new-series\">.*?<ul class=\"seasons-list\">(.*?)<\/ul>',re.DOTALL).findall(l.text.encode('utf-8'))
		if m:
			sezony=re.compile('<a href=\"(.*?)\">(.*?)<\/a>',re.DOTALL).findall(m[0])
		if sezony:
			# przetestowac
			slinks=[]
			snames=[]
			for s in sezony:
				slinks.append(s[0])
				snames.append(s[1])
			sezon=slinks[xbmcgui.Dialog().select('Wybor zrodla',snames)]
			common.log(sezon)
		else:
			sezon="/series/season/current"
	l=None
	l=common.solveCFP(u+sezon)
	if not l==None:
		rows=re.compile('<li class=\"title anime\".*?<section>.*?<a href=\"(.*?)\" class=\"img  media-title-cover\".*?<img src=\"(.*?)\" alt=\"(.*?)\".*?<div class=\"title-desc box-scrollable\">(.*?)<\/div>',re.DOTALL).findall(l.text.encode('utf-8'))
		if rows:
			for r in range(len(rows)):
				title=rows[r][2]
				link=rows[r][0]
				img=rows[r][1]
				desc=rows[r][3]
				l=link+"/all-episodes"
				li=xbmcgui.ListItem(title,thumbnailImage=MURL+img)
				
				info={'plotoutline':desc,'plot':desc}
				li.setInfo( type="video", infoLabels = info )
				u=common.sysaddon+"?mode=shindenpl&action=seria&url="+urllib.quote_plus(l)
				xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=u,listitem=li,isFolder=True)
				
				
				
	xbmcplugin.setContent(common.addon_handle, 'episodes')		
	xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 10
0
def alfabetycznie(p):
    xbmcplugin.setContent(common.addon_handle, 'tvshows')
    u = MURL + p.get('url', '/seriale-online/')
    l = common.solveCFP(u)
    if not l == None:
        try:
            lista = re.compile(
                '<ul class=\"list-unstyled text-white term-list clearfix\">(.*?)<\/ul>',
                re.DOTALL).findall(l.text.encode('utf-8'))
            letters = re.compile('<li class=\"letter\">(.*?)<\/li>',
                                 re.DOTALL).findall(lista[0])
            for l in range(len(letters)):
                items = re.compile(
                    '<li data-letter=\"' + letters[l] +
                    '\">(<a.*?<\/a>)<\/li>', re.DOTALL).findall(lista[0])
                li = xbmcgui.ListItem(
                    '[COLOR gold] ------------------------ ' + letters[l] +
                    ' ------------------------ [/COLOR]')
                li.setProperty('IsPlayable', 'false')
                xbmcplugin.addDirectoryItem(handle=common.addon_handle,
                                            url='',
                                            listitem=li,
                                            isFolder=False)
                for i in range(len(items)):
                    try:
                        link = re.compile('<a href=\"(.*?)\">',
                                          re.DOTALL).findall(items[i])[0]
                        title = helpers.PLchar(
                            re.compile('<a href=.*?>(.*?)<\/a>',
                                       re.DOTALL).findall(items[i])[0])
                        li = xbmcgui.ListItem(title)
                        info = {}
                        li.setInfo(type="video", infoLabels=info)
                        li.setProperty('IsPlayable', 'true')
                        u = common.sysaddon + "?mode=alltubepl&action=serial&url=" + urllib.quote_plus(
                            link)
                        xbmcplugin.addDirectoryItem(handle=common.addon_handle,
                                                    url=u,
                                                    listitem=li,
                                                    isFolder=True)
                    except:
                        common.log('litera ' + letter[l] + ' - ' + len(items) +
                                   ' elementow | error')
        except:
            xbmcplugin.addDirectoryItem(
                handle=common.addon_handle,
                url=common.sysaddon + "?mode=alltubepl&action=alfabetycznie",
                listitem=xbmcgui.ListItem("[COLOR red]-- error --[/COLOR]"),
                isFolder=True)
    xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 11
0
def news(p):

    url=MURL+p.get('url','')

    # wyslac zapytanie do strony

    src=common.solveCFP(url)

    if not src==None:

        try:

            items=re.compile('<h2 class=\"naglowek\">(.*?)</h2>.*?<div class=\"tresc\">(/*?)</div>',re.DOTALL).findall(src.text.encode('utf-8'))

        except:
Ejemplo n.º 12
0
def serie(params):
    u = MURL + params.get('url', '/anime/lista/')

    letters = [
        '0', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
        'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
    ]
    letter = letters[xbmcgui.Dialog().select(
        'Wyswietl anime zaczynajace sie na', letters)]
    u += letter

    l = common.solveCFP(u)
    if not l == None:
        try:
            rows = re.compile(
                '<div class=\"well well-sm categories\">.*?<div class=\"image pull-left\">.*?<a href=\"(.*?)\">.*?<img src=\"(.*?)\".*?<i class=\"fa fa-star\"></i>(.*?)</span>.*?<div class=\"description pull-right\">.*?<a href=\".*?\">(.*?)</a>.*?<p>(.*?)</p>',
                re.DOTALL).findall(l.text.encode('utf-8'))
            for r in range(len(rows)):
                img = rows[r][1]
                title = rows[r][3]
                link = rows[r][0]
                ocena = rows[r][2]
                desc = rows[r][4]

                li = xbmcgui.ListItem(title, thumbnailImage=MURL + img)
                info = {'rating': ocena, 'plot': desc}
                li.setInfo(type="video", infoLabels=info)
                li.setProperty('IsPlayable', 'true')
                li.setProperty('fanart_image', MURL + img)

                u = common.sysaddon + "?mode=animezonepl&action=seria&url=" + urllib.quote_plus(
                    link)
                xbmcplugin.addDirectoryItem(handle=common.addon_handle,
                                            url=u,
                                            listitem=li,
                                            isFolder=True)
        except:
            xbmcplugin.addDirectoryItem(
                handle=common.addon_handle,
                url=common.sysaddon + "?mode=animezonepl&action=serie",
                listitem=xbmcgui.ListItem("[COLOR red]-- error --[/COLOR]"),
                isFolder=True)

    xbmcplugin.setContent(common.addon_handle, 'tvshows')
    xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 13
0
def morelinks(params):
	u=MURL+params.get('url','')
	l=common.solveCFP(u)
	if not l==None:
		try:
			m=re.compile('<li class=\"relation_t2t\">.*?<a href=\"(.*?)\" title=\"(.*?)\".*?class=\"figure-type\">(.*?)</.*?<img src=\"(.*?)\".*?class=\"figure-type\">(.*?)</',re.DOTALL).findall(l.text.encode('utf-8'))
			for r in range(len(m)):
				title="[%s] %s (%s)"%(m[r][2][0],m[r][1],m[r][4])
				link=m[r][0]+'/all-episodes'
				img=m[r][3].replace("/100x100/","/genuine/")
				li=xbmcgui.ListItem(title,thumbnailImage=MURL+img)
				li.setInfo( type="video", infoLabels = {} )
				li.setProperty('IsPlayable', 'true')
				li.setProperty('fanart_image', MURL+img )
				cm=[]
				cm.append(('Wyświetl opis', 'RunPlugin(%s?mode=shindenpl&action=opis&url=%s)' % (common.sysaddon,urllib.quote_plus(link))))
				## dodaje menu kontekstowe
				li.addContextMenuItems(cm)
				u=common.sysaddon+"?mode=shindenpl&action=seria&url="+urllib.quote_plus(link)
				xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=u,listitem=li,isFolder=True) 
		except:
			common.log("brak dodatkowych informacji")
			common.info("Problem z pobraniem dodatkowych linków","BŁĄD", time=5000)
		try:
			m=re.compile('<ul class=\"media-list box-scrollable\">(.*)<\/ul>',re.DOTALL).findall(l.text.encode('utf-8'))[0]
			m=re.compile('<li class=\"media media-item\">.*?<img class=\"img media-title-cover\" src=\"(.*?)\".*?<a href=\"(.*?)\">(.*?)</a>.*?<\/li>',re.DOTALL).findall(m)
			for r in range(len(m)):
				title=m[r][2]
				link=m[r][1]+'/all-episodes'
				img=m[r][0].replace("/100x100/","/genuine/")
				li=xbmcgui.ListItem(title,thumbnailImage=MURL+img)
				li.setInfo( type="video", infoLabels = {} )
				li.setProperty('IsPlayable', 'true')
				li.setProperty('fanart_image', MURL+img )
				cm=[]
				cm.append(('Wyświetl opis', 'RunPlugin(%s?mode=shindenpl&action=opis&url=%s)' % (common.sysaddon,urllib.quote_plus(link))))
				## dodaje menu kontekstowe
				li.addContextMenuItems(cm)
				u=common.sysaddon+"?mode=shindenpl&action=seria&url="+urllib.quote_plus(link)
				xbmcplugin.addDirectoryItem(handle=common.addon_handle,url=u,listitem=li,isFolder=True)
		except:
			common.log("brak dodatkowych informacji")
			common.info("Problem z pobraniem dodatkowych linków","BŁĄD", time=5000)       
	xbmcplugin.setContent(common.addon_handle, 'tvshows')
	xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 14
0
def seria(params):
    u = MURL + params.get('url', '')
    l = common.solveCFP(u)
    if not l == None:
        ##getEpizodes(s,'playEpizod')

        rows = re.compile(
            '<td class=\"text-center\"><strong>(.*?)</strong>.*?<td class=\"episode-title\">(.*?)</td>.*?<a href=\"\.\.(.*?)\"',
            re.DOTALL).findall(l.text.encode('utf-8'))

        img = re.compile(
            '<div class=\"image pull-left\">.*?<img src=\"(.*?)\".*?class=\"img-responsive\">.*?</div>',
            re.DOTALL).findall(l.text.encode('utf-8'))[0]

        if rows:
            for r in range(len(rows)):
                title = '(' + rows[r][0] + ')' + rows[r][1]
                link = rows[r][2]
                addLink(title, link, img, 'animezonepl&action=playEpizod')
    xbmcplugin.setContent(common.addon_handle, 'episodes')
    xbmcplugin.endOfDirectory(common.addon_handle)
Ejemplo n.º 15
0
def playEpizod(params):
    xbmcplugin.setContent(common.addon_handle, 'movie')
    u = MURL + params.get('url', '')
    l = common.solveCFP(u)
    if not l == None:
        rows = re.compile(
            '<tr>.*?<td>(.*?)</td>.*?<span class=\"sprites (.*?) lang\">.*?<button class=\".*?\" data-efl=\"(.*?)\">',
            re.DOTALL).findall(l.text.encode('utf-8'))
        players = []
        selList = []
        for r in range(len(rows)):
            pl = rows[r][0] or 0
            subs = rows[r][1] or 0
            id = rows[r][2] or 0
            players.append([pl, id])
            selList.append("%s [COLOR lime]%s[/COLOR]" % (pl, subs))
        playfrom = xbmcgui.Dialog().select('Wybor zrodla', selList)
        if playfrom >= 0:
            player(players[playfrom], u)
    else:
        common.info("LINK FEATCHING FAILED", "E404", time=5000)
    xbmcplugin.endOfDirectory(common.addon_handle)