Example #1
0
def search():
    if mode == 3:
        return False
    text = searchdialog()
    if not text:
        xbmc.executebuiltin(
            "XBMC.Notification(KodiTVR : Search field is empty,search canceled,4000,"
            + icon + ")")
        return
    xbmc.log(str(text))
    open = tools.OPEN_URL(panel_api)
    all_chans = tools.regex_get_all(open, '{"num":', 'tv_arch')
    for a in all_chans:
        name = tools.regex_from_to(a, 'name":"', '"').replace('\/', '/')
        url = tools.regex_from_to(a, '"stream_id":"', '"')
        comp = tools.regex_from_to(a, '"container_extension":"', '"')
        lms = tools.regex_from_to(a, '"stream_type":"', '"')
        thumb = tools.regex_from_to(a, 'stream_icon":"',
                                    '"').replace('\/', '/')
        if lms == 'live':
            if text in name.lower():
                tools.addDir(
                    name, search_play + 'live/' + username + '/' + password +
                    '/' + url + '.ts', 4, thumb, fanart, '')
            elif text not in name.lower() and text in name:
                tools.addDir(
                    name, search_play + 'live/' + username + '/' + password +
                    '/' + url + '.ts', 4, thumb, fanart, '')
        else:
            if text in name.lower():
                tools.addDir(
                    name, search_play + lms + '/' + username + '/' + password +
                    '/' + url + '.' + comp, 4, thumb, fanart, '')
            elif text not in name.lower() and text in name:
                tools.addDir(
                    name, search_play + lms + '/' + username + '/' + password +
                    '/' + url + '.' + comp, 4, thumb, fanart, '')
    textenc = text.encode("utf-8")
    xbmc.log(str(base64.b64encode(textenc)))
    open = tools.OPEN_URL(panel_api1)
    all_chans = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_chans:
        name = tools.regex_from_to(a, '<title>', '</title>')
        name = base64.b64decode(name).decode("utf-8")
        url = tools.regex_from_to(a,
                                  '<playlist_url>', '</playlist_url>').replace(
                                      '<![CDATA[', '').replace(']]>', '')
        lms = tools.regex_from_to(a, '"stream_type":"', '"')
        thumb = tools.regex_from_to(a, 'stream_icon":"',
                                    '"').replace('\/', '/')
        if text in name.lower():
            tools.addDir(name, url, 34, thumb, fanart, '')
        elif text not in name.lower() and text in name:
            tools.addDir(name, url, 34, thumb, fanart, '')
Example #2
0
def Seasons(url):
        open = tools.OPEN_URL(url)       
        all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		name = tools.regex_from_to(a,'<category_id>','</category_id>')
		url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
                open1 = tools.OPEN_URL(url1)
                all_cats = tools.regex_get_all(open1,'<channel>','</channel>')
                for a in all_cats:
                        name = tools.regex_from_to(a,'<category_id>','</category_id>')
                        url2  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
                        tools.addDir(("Season "+name).replace('?',''),url2,22,icon,fanart,'')
Example #3
0
def livecategory(url):
    open = tools.OPEN_URL(live_url)
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        name = tools.regex_from_to(a, '<title>', '</title>')
        name = base64.b64decode(name)
        url1 = tools.regex_from_to(a, '<playlist_url>',
                                   '</playlist_url>').replace('<![CDATA[',
                                                              '').replace(
                                                                  ']]>', '')
        tools.addDir(
            name.replace('UK:', '[COLOR blue]UK:[/COLOR]').replace(
                'USA/CA:', '[COLOR blue]USA/CA:[/COLOR]').replace(
                    'All', '[COLOR blue]A[/COLOR]ll').replace(
                        'International',
                        '[COLOR blue]Int[/COLOR]ertaional').replace(
                            'Live:', '[COLOR blue]Live:[/COLOR]').replace(
                                'TEST', '[COLOR blue]TEST[/COLOR]').replace(
                                    'Install',
                                    '[COLOR blue]Install[/COLOR]').replace(
                                        '24/7', '[COLOR blue]24/7[/COLOR]').
            replace('INT:', '[COLOR blue]INT:[/COLOR]').replace(
                'DE:', '[COLOR blue]DE:[/COLOR]').replace(
                    'FR:', '[COLOR blue]FR:[/COLOR]').replace(
                        'PL:', '[COLOR blue]PL:[/COLOR]').replace(
                            'AR:', '[COLOR blue]AR:[/COLOR]').replace(
                                'LIVE:', '[COLOR blue]LIVE:[/COLOR]').replace(
                                    'ES:', '[COLOR blue]ES:[/COLOR]').replace(
                                        'IN:',
                                        '[COLOR blue]IN:[/COLOR]').replace(
                                            'PK:', '[COLOR blue]PK:[/COLOR]'),
            url1, 2, icon, fanart, '')
Example #4
0
def tvshows(url):
	if url =="tv":
		open = tools.OPEN_URL(tv_url)
	else:
		open = tools.OPEN_URL(url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in sorted(all_cats):
		if '<playlist_url>' in open:
			name = tools.regex_from_to(a,'<title>','</title>')
			name = base64.b64decode(name)
			url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
			
			from metahandler import metahandlers
			md   = metahandlers.MetaData()
			meta = md.get_meta('tvshow', name, '')
			
			i = meta['cover_url']
			if i == "":i = icon
			
			f = meta['backdrop_url']
			if f == "":f = fanart

			tools.addDir(str(name).replace('?',''),url1,2,i,f,'')
		else:
		
		
			name = tools.regex_from_to(a,'<title>','</title>')
			name = base64.b64decode(name)
			thumb= tools.regex_from_to(a,'<desc_image>','</desc_image>').replace('<![CDATA[','').replace(']]>','')
			url  = tools.regex_from_to(a,'<stream_url>','</stream_url>').replace('<![CDATA[','').replace(']]>','')
			tools.addDir(name,url,4,icon,fanart,'')
Example #5
0
def movies(url):
	if url =="vod":
		open = tools.OPEN_URL(vod_url)
	else:
		open = tools.OPEN_URL(url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		if '<playlist_url>' in open:
			name = tools.regex_from_to(a,'<title>','</title>')
			name = base64.b64decode(name)
			url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
			if not 'TV shows' in name:
				tools.addDir(str(name).replace('?',''),url1,1,icon,fanart,'')
		else:
				try:
					name = tools.regex_from_to(a,'<title>','</title>')
					name = base64.b64decode(name)
					thumb= tools.regex_from_to(a,'<desc_image>','</desc_image>').replace('<![CDATA[','').replace(']]>','')
					url  = tools.regex_from_to(a,'<stream_url>','</stream_url>').replace('<![CDATA[','').replace(']]>','')
					desc = tools.regex_from_to(a,'<description>','</description>')
					desc = base64.b64decode(desc)
					plot = tools.regex_from_to(desc,'PLOT:','\n')
					cast = tools.regex_from_to(desc,'CAST:','\n')
					ratin= tools.regex_from_to(desc,'RATING:','\n')
					year = tools.regex_from_to(desc,'RELEASEDATE:','\n').replace(' ','-')
					year = re.compile('-.*?-.*?-(.*?)-',re.DOTALL).findall(year)
					runt = tools.regex_from_to(desc,'DURATION_SECS:','\n')
					genre= tools.regex_from_to(desc,'GENRE:','\n')
					tools.addDirMeta(str(name).replace('[/COLOR].','.[/COLOR]'),url,4,thumb,fanart,plot,str(year).replace("['","").replace("']",""),str(cast).split(),ratin,runt,genre)
				except:pass
				xbmcplugin.setContent(int(sys.argv[1]), 'movies')
def listcatchup():
    open = tools.OPEN_URL(panel_api)
    all = tools.regex_get_all(open, '{"num', 'direct')
    for a in all:
        if '"tv_archive":1' in a:
            name = tools.regex_from_to(a, '"epg_channel_id":"', '"')
            thumb = tools.regex_from_to(a, '"stream_icon":"',
                                        '"').replace('\/', '/')
            id = tools.regex_from_to(a, 'stream_id":"', '"')
            tools.addDir(
                name.replace('ENT:', '[COLOR white]ENT:[/COLOR]').replace(
                    'DOC:', '[COLOR white]DOC:[/COLOR]').replace(
                        'MOV:', '[COLOR white]MOV:[/COLOR]').replace(
                            'SSS:', '[COLOR white]SSS[/COLOR]').
                replace('BTS:', '[COLOR white]BTS:[/COLOR]').replace(
                    'TEST', '[COLOR white]TEST[/COLOR]').replace(
                        'Install', '[COLOR white]Install[/COLOR]').replace(
                            '24/7', '[COLOR white]24/7[/COLOR]').replace(
                                'INT:', '[COLOR white]INT:[/COLOR]').replace(
                                    'DE:', '[COLOR white]DE:[/COLOR]').replace(
                                        'FR:', '[COLOR white]FR:[/COLOR]').
                replace('PL:', '[COLOR white]PL:[/COLOR]').replace(
                    'AR:', '[COLOR white]AR:[/COLOR]').replace(
                        'LIVE:', '[COLOR white]LIVE:[/COLOR]').replace(
                            'ES:', '[COLOR white]ES:[/COLOR]').replace(
                                'IN:', '[COLOR white]IN:[/COLOR]').replace(
                                    'PK:', '[COLOR white]PK:[/COLOR]'), 'url',
                13, thumb, fanart, id)
Example #7
0
def season_list(url):  # Added by @ShaneysRepo
    url = buildcleanurl(url)
    open = tools.OPEN_URL(url)
    series = tools.regex_from_to(open, '<category_title>',
                                 '</category_title>').replace('<![CDATA[',
                                                              '').replace(
                                                                  ']]>', '')
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        name = tools.regex_from_to(a, '<title>', '</title>')
        name = base64.b64decode(name)
        xbmc.log(str(name))
        name = re.sub('\[.*?min ', '-', name)
        thumb = tools.regex_from_to(a,
                                    '<desc_image>', '</desc_image>').replace(
                                        '<![CDATA[', '').replace(']]>', '')
        url1 = tools.regex_from_to(a, '<stream_url>', '</stream_url>').replace(
            '<![CDATA[', '').replace(']]>', '')
        desc = tools.regex_from_to(a, '<description>', '</description>')
        if xbmcaddon.Addon().getSetting('hidexxx') == 'true':
            tools.addDir(url1, url1, 4, thumb, background,
                         base64.b64decode(desc))
        else:
            if not 'XXX:' in name:
                if not 'XXX vod:' in name:
                    tools.addDir(name, url1, 4, thumb, background,
                                 base64.b64decode(desc))
Example #8
0
def livecategory(url):
    if 'server1' in url:
        username = control.setting('server1user')
        password = control.setting('server1pass')
        host = user.server1host
        port = user.server1port
    elif 'server2' in url:
        username = control.setting('server2user')
        password = control.setting('server2pass')
        host = user.server2host
        port = user.server2port

    url = '%s:%s/enigma2.php?username=%s&password=%s&type=get_live_categories' % (
        host, port, username, password)
    open = tools.OPEN_URL(url)
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        name = tools.regex_from_to(a, '<title>', '</title>')
        name = base64.b64decode(name)
        url1 = tools.regex_from_to(a, '<playlist_url>',
                                   '</playlist_url>').replace('<![CDATA[',
                                                              '').replace(
                                                                  ']]>', '')
        if not 'Install Videos' in name:
            if not 'TEST CHANNELS' in name:
                tools.addDir(name, url1, 2, icon, fanart, '')
Example #9
0
def listcatchup(url):
    if 'server1' in url:
        username = control.setting('server1user')
        password = control.setting('server1pass')
        host = user.server1host
        port = user.server1port
        u = '%s:%s/panel_api.php?username=%s&password=%s' % (
            host, port, username, password)
    elif 'server2' in url:
        username = control.setting('server2user')
        password = control.setting('server2pass')
        host = user.server2host
        port = user.server2port
        u = '%s:%s/panel_api.php?username=%s&password=%s' % (
            host, port, username, password)
    open = tools.OPEN_URL(u)
    all = tools.regex_get_all(open, '{"num', 'direct')
    for a in all:
        if '"tv_archive":1' in a:
            name = tools.regex_from_to(a, '"epg_channel_id":"',
                                       '"').replace('\/', '/')
            thumb = tools.regex_from_to(a, '"stream_icon":"',
                                        '"').replace('\/', '/')
            id = tools.regex_from_to(a, 'stream_id":"', '"')
            if not name == "":
                tools.addDir(name, url, 12, thumb, fanart, id)
Example #10
0
def Livelist(url):
    open = tools.OPEN_URL(url)
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        name = tools.regex_from_to(a, '<title>', '</title>')
        name = base64.b64decode(name).decode("utf-8")
        xbmc.log(str(name))
        try:
            name = re.sub('\[.*?min ', '-', name)
        except:
            pass
        thumb = tools.regex_from_to(a,
                                    '<desc_image>', '</desc_image>').replace(
                                        '<![CDATA[', '').replace(']]>', '')
        url1 = tools.regex_from_to(a, '<stream_url>', '</stream_url>').replace(
            '<![CDATA[', '').replace(']]>', '')
        desc = tools.regex_from_to(a, '<description>', '</description>')
        tools.addDir(
            name,
            url1,
            4,
            thumb,
            fanart,
            base64.b64decode(desc),
        )
Example #11
0
def eps(url):
        open = tools.OPEN_URL(url)
	#print open
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		name = tools.regex_from_to(a,'<title>','</title>')
		url1  = tools.regex_from_to(a,'<stream_url>','</stream_url>').replace('<![CDATA[','').replace(']]>','')
		tools.addDir(str(base64.b64decode(name)).replace('?',''),url1,4,icon,fanart,'')
Example #12
0
def listcatchup():
	open = tools.OPEN_URL(panel_api)
	all  = tools.regex_get_all(open,'{"num','direct')
	for a in all:
		if '"tv_archive":1' in a:
			name = tools.regex_from_to(a,'"epg_channel_id":"','"')
			thumb= tools.regex_from_to(a,'"stream_icon":"','"').replace('\/','/')
			id   = tools.regex_from_to(a,'stream_id":"','"')
			tools.addDir(name,'url',13,thumb,fanart,id)
Example #13
0
def livecategory(url):
	
	open = tools.OPEN_URL(live_url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		name = tools.regex_from_to(a,'<title>','</title>')
		name = base64.b64decode(name)
		url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
		tools.addDir(name,url1,2,icon,fanart,'')
Example #14
0
def Series(url):
        open = tools.OPEN_URL(Series_url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		if '<playlist_url>' in open:
			name = tools.regex_from_to(a,'<title>','</title>')
			url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
			tools.addDir(str(base64.b64decode(name)).replace('?',''),url1,21,icon,fanart,'')
		else:
                        print "Test"
			'''if xbmcaddon.Addon().getSetting('meta') == 'true':
Example #15
0
def series_cats(url):	# added by @ShaneysRepo
	open = tools.OPEN_URL(series_url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		name = tools.regex_from_to(a,'<title>','</title>')
		name = base64.b64decode(name)
		url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
		if xbmcaddon.Addon().getSetting('hidexxx')=='true':
			tools.addDir('%s'%name,url1,25,icon,background,'')
		else:
			if not 'XXX |' in name:
				tools.addDir('%s'%name,url1,25,icon,background,'')
Example #16
0
def livecategory(url):
	
	open = tools.OPEN_URL(live_url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		name = tools.regex_from_to(a,'<title>','</title>')
		name = base64.b64decode(name)
		url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
		if xbmcaddon.Addon().getSetting('hidexxx')=='true':
			tools.addDir('%s'%name,url1,2,icon,fanart,'')
		else:
			if not 'XXX |' in name:
				tools.addDir('%s'%name,url1,2,icon,fanart,'')
Example #17
0
def Livelist(url):
	url  = buildcleanurl(url)
	open = tools.OPEN_URL(url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		name = tools.regex_from_to(a,'<title>','</title>')
		name = base64.b64decode(name)
		xbmc.log(str(name))
		name = re.sub('\[.*?min ','-',name)
		thumb= tools.regex_from_to(a,'<desc_image>','</desc_image>').replace('<![CDATA[','').replace(']]>','')
		url1  = tools.regex_from_to(a,'<stream_url>','</stream_url>').replace('<![CDATA[','').replace(']]>','')
		desc = tools.regex_from_to(a,'<description>','</description>')
		if xbmcaddon.Addon().getSetting('hidexxx')=='true':
			tools.addDir(name,url1,4,thumb,fanart,base64.b64decode(desc))
		else:
			if not 'XXX:' in name:
				if not 'XXX VOD:' in name:
					tools.addDir(name,url1,4,thumb,fanart,base64.b64decode(desc))
Example #18
0
def search():
	if mode==3:
		return False
	text = searchdialog()
	if not text:
		xbmc.executebuiltin("XBMC.Notification([COLOR red][B]Search is Empty[/B][/COLOR],Aborting search,4000,"+icon+")")
		return
	xbmc.log(str(text))
	open = tools.OPEN_URL(panel_api)
	all_chans = tools.regex_get_all(open,'{"num":','epg')
	for a in all_chans:
		name = tools.regex_from_to(a,'name":"','"').replace('\/','/')
		url  = tools.regex_from_to(a,'"stream_id":"','"')
		thumb= tools.regex_from_to(a,'stream_icon":"','"').replace('\/','/')
		if text in name.lower():
			tools.addDir(name,play_url+url+'.ts',4,thumb,fanart,'')
		elif text not in name.lower() and text in name:
			tools.addDir(name,play_url+url+'.ts',4,thumb,fanart,'')
Example #19
0
def vod(url):
    if 'VOD:' in url:
        a = url.replace('VOD:', '')
        if 'server1' in a:
            username = control.setting('server1user')
            password = control.setting('server1pass')
            host = user.server1host
            port = user.server1port
            url = '%s:%s/enigma2.php?username=%s&password=%s&type=get_vod_categories' % (
                host, port, username, password)
        elif 'server2' in a:
            username = control.setting('server2user')
            password = control.setting('server2pass')
            host = user.server2host
            port = user.server2port
            url = '%s:%s/enigma2.php?username=%s&password=%s&type=get_vod_categories' % (
                host, port, username, password)

        open = tools.OPEN_URL(url)

    else:
        open = tools.OPEN_URL(url)
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        if '<playlist_url>' in open:
            name = tools.regex_from_to(a, '<title>', '</title>')
            url1 = tools.regex_from_to(a, '<playlist_url>',
                                       '</playlist_url>').replace(
                                           '<![CDATA[', '').replace(']]>', '')
            tools.addDir(
                str(base64.b64decode(name)).replace('?', ''), url1, 3, icon,
                fanart, '')
        else:
            name = tools.regex_from_to(a, '<title>', '</title>')
            name = base64.b64decode(name)
            thumb = tools.regex_from_to(a, '<desc_image>',
                                        '</desc_image>').replace(
                                            '<![CDATA[',
                                            '').replace(']]>', '')
            url = tools.regex_from_to(a, '<stream_url>',
                                      '</stream_url>').replace(
                                          '<![CDATA[', '').replace(']]>', '')
            desc = tools.regex_from_to(a, '<description>', '</description>')
            tools.addDir(name, url, 13, thumb, fanart, base64.b64decode(desc))
Example #20
0
def livecategory(url):
	
	open = tools.OPEN_URL(live_url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		name = tools.regex_from_to(a,'<title>','</title>')
		name = base64.b64decode(name)
		
		url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
	
		check = control.setting('ADULT')
		
		if not 'TWITCH TV' in name:

			if check=='true':
				tools.addDir(name,url1,2,icon,fanart,'')
			else:
				if not 'ADULT XXX' in name:
					tools.addDir(name,url1,2,icon,fanart,'')
Example #21
0
def Series(url):
    open = tools.OPEN_URL(url)
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        if '<playlist_url>' in open:
            name = tools.regex_from_to(a, '<title>', '</title>')
            url1 = tools.regex_from_to(a, '<playlist_url>',
                                       '</playlist_url>').replace(
                                           '<![CDATA[', '').replace(']]>', '')
            tools.addDir(
                str(base64.b64decode(name).decode("utf-8")).replace('?', ''),
                url1,
                21,
                icon,
                fanart,
                '',
            )
        else:
            pass
Example #22
0
def footballsearch(description):
    if description == 'BBC1 Scotland':
        tools.addDir(
            'BBC1 Scotland',
            'http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_scotland_hd.m3u8',
            4, icon, fanart, '')
    else:
        open = tools.OPEN_URL(panel_api)
        all_chans = tools.regex_get_all(open, '{"num":', 'epg')
        for a in all_chans:
            name = tools.regex_from_to(a, 'name":"', '"').replace('\/', '/')
            url = tools.regex_from_to(a, '"stream_id":"', '"')
            thumb = tools.regex_from_to(a, 'stream_icon":"',
                                        '"').replace('\/', '/')
            chan = description.lower()
            chan = chan.replace('bbc2', 'bbc two').replace('bbc1', 'bbc one')
            if chan in name.lower():
                tools.addDir(name, play_url + url + '.ts', 4, thumb, fanart,
                             '')
Example #23
0
def Livelist(url):
    open = tools.OPEN_URL(url)
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        name = tools.regex_from_to(a, '<title>', '</title>')
        name = base64.b64decode(name)
        xbmc.log(str(name))
        try:
            name = re.sub('\[.*?min ', '-', name)
        except:
            pass
        thumb = tools.regex_from_to(a,
                                    '<desc_image>', '</desc_image>').replace(
                                        '<![CDATA[', '').replace(']]>', '')
        url1 = tools.regex_from_to(a, '<stream_url>', '</stream_url>').replace(
            ']]>', ''
        ).replace(
            'http://perolanegra.net',
            'plugin://plugin.video.f4mTester/?name=BlackPearl&streamtype=HLSRETRY&amp;url=http://perolanegra.net'
        ).replace('<![CDATA[', '')
        desc = tools.regex_from_to(a, '<description>', '</description>')
        tools.addDir(name, url1, 4, thumb, fanart, base64.b64decode(desc))
Example #24
0
def get():
    url = 'http://www.wheresthematch.com/live-football-on-tv/'
    open = tools.OPEN_URL(url)
    all_lists = tools.regex_get_all(open, '<td class="home-team">', '</tr>')
    for a in all_lists:
        name = re.compile(
            '<em class="">(.*?)<em class="">(.*?)</em>.*?<em class="">(.*?)</em>',
            re.DOTALL).findall(a)
        for home, v, away in name:
            koff = tools.regex_from_to(a, '<strong>', '</strong>')
            chan = tools.regex_from_to(a, 'class="channel-name">', '</span>')
            if chan == "Live Stream":
                chan = 'Not Televised'
            thumb = tools.regex_from_to(a,
                                        '                        <img src="',
                                        '"')
            if 'Bet 365 Live' not in chan:
                tools.addDir(
                    koff + ' - ' + str(home).replace('</em>', '') + ' ' + v +
                    '  ' + away + '   -   [COLOR blue]%s[/COLOR]' % chan,
                    'url', 18, 'http://www.wheresthematch.com' +
                    str(thumb).replace('..', ''), fanart, chan)
Example #25
0
def search(url):
    if url == "" or mode == 3:
        return False
    text = searchdialog()
    if not text:
        xbmc.executebuiltin(
            "XBMC.Notification([COLOR white][B]Search is Empty[/B][/COLOR],Aborting search,4000,"
            + icon + ")")
        return

    if 'server1' in url:
        username = control.setting('server1user')
        password = control.setting('server1pass')
        host = user.server1host
        port = user.server1port
        url = '%s:%s/panel_api.php?username=%s&password=%s' % (
            host, port, username, password)
    elif 'server2' in url:
        username = control.setting('server2user')
        password = control.setting('server2pass')
        host = user.server2host
        port = user.server2port
        url = '%s:%s/panel_api.php?username=%s&password=%s' % (
            host, port, username, password)

    open = tools.OPEN_URL(url)
    all_chans = tools.regex_get_all(open, '{"num":', 'epg')
    for a in all_chans:
        name = tools.regex_from_to(a, 'name":"', '"').replace('\/', '/')
        url = tools.regex_from_to(a, '"stream_id":"', '"')
        thumb = tools.regex_from_to(a, 'stream_icon":"',
                                    '"').replace('\/', '/')
        if text in name.lower():
            burl = '%s:%s/live/%s/%s/' % (host, port, username, password)
            tools.addDir(name, burl + url + '.ts', 4, thumb, fanart, '')
        elif text not in name.lower() and text in name:
            burl = '%s:%s/live/%s/%s/' % (host, port, username, password)
            tools.addDir(name, burl + url + '.ts', 4, thumb, fanart, '')
Example #26
0
def vod(url):
	if url =="vod":
		open = tools.OPEN_URL(vod_url)
	else:
		url  = buildcleanurl(url)
		open = tools.OPEN_URL(url)
	all_cats = tools.regex_get_all(open,'<channel>','</channel>')
	for a in all_cats:
		if '<playlist_url>' in open:
			name = tools.regex_from_to(a,'<title>','</title>')
			url1  = tools.regex_from_to(a,'<playlist_url>','</playlist_url>').replace('<![CDATA[','').replace(']]>','')
			tools.addDir(str(base64.b64decode(name)).replace('?',''),url1,3,icon,background,'')
		else:
			if xbmcaddon.Addon().getSetting('meta') == 'true':
				try:
					name = tools.regex_from_to(a,'<title>','</title>')
					name = base64.b64decode(name)
					thumb= tools.regex_from_to(a,'<desc_image>','</desc_image>').replace('<![CDATA[','').replace(']]>','')
					url  = tools.regex_from_to(a,'<stream_url>','</stream_url>').replace('<![CDATA[','').replace(']]>','')
					desc = tools.regex_from_to(a,'<description>','</description>')
					desc = base64.b64decode(desc)
					plot = tools.regex_from_to(desc,'PLOT:','\n')
					cast = tools.regex_from_to(desc,'CAST:','\n')
					ratin= tools.regex_from_to(desc,'RATING:','\n')
					year = tools.regex_from_to(desc,'RELEASEDATE:','\n').replace(' ','-')
					year = re.compile('-.*?-.*?-(.*?)-',re.DOTALL).findall(year)
					runt = tools.regex_from_to(desc,'DURATION_SECS:','\n')
					genre= tools.regex_from_to(desc,'GENRE:','\n')
					tools.addDirMeta(str(name).replace('[/COLOR][/B].','.[/COLOR][/B]'),url,4,thumb,background,plot,str(year).replace("['","").replace("']",""),str(cast).split(),ratin,runt,genre)
				except:pass
				xbmcplugin.setContent(int(sys.argv[1]), 'vod')
			else:
				name = tools.regex_from_to(a,'<title>','</title>')
				name = base64.b64decode(name)
				thumb= tools.regex_from_to(a,'<desc_image>','</desc_image>').replace('<![CDATA[','').replace(']]>','')
				url  = tools.regex_from_to(a,'<stream_url>','</stream_url>').replace('<![CDATA[','').replace(']]>','')
				desc = tools.regex_from_to(a,'<description>','</description>')
				tools.addDir(name,url,4,thumb,background,base64.b64decode(desc))
Example #27
0
def searchbyname(search):
    from resources.modules import downloader

    now = str(datetime.datetime.now().date()).replace('-', '').replace(
        ' ', '').replace('.', ',')
    now = re.sub(',.+?$', '', now)

    EpgUrl = user.host + ':' + user.port + '/xmltv.php?username=%s&password=%s' % (
        username, password)

    open = tools.OPEN_URL(EpgUrl)

    prog = tools.regex_get_all(open, '<programme', '</programme')
    open = tools.OPEN_URL(panel_api)
    for a in prog:
        chan = tools.regex_from_to(a, 'channel="', '"')
        name = tools.regex_from_to(a, 'title>', '<')
        start = tools.regex_from_to(a, 'start="', ' ')
        stop = tools.regex_from_to(a, 'stop="', ' ')

        if search.lower() in name.lower() or search.lower() == name.lower():
            if now in start:
                SearchChannels(cleanchannel(chan), open)
Example #28
0
def footballguidesearch(description):
    if description == 'BBC1 Scotland':
        tools.addDir(
            'BBC1 Scotland',
            'http://a.files.bbci.co.uk/media/live/manifesto/audio_video/simulcast/hls/uk/abr_hdtv/ak/bbc_one_scotland_hd.m3u8',
            4, icon, fanart, '')
    else:
        xbmc.log(str(description))
        open = tools.OPEN_URL(panel_api)
        all_chans = tools.regex_get_all(open, '{"num":', 'epg')
        for a in all_chans:
            name = tools.regex_from_to(a, 'name":"', '"').replace('\/', '/')
            url = tools.regex_from_to(a, '"stream_id":"', '"')
            thumb = tools.regex_from_to(a, 'stream_icon":"',
                                        '"').replace('\/', '/')
            chan = description.lower()
            if chan in name.lower():
                tools.addDir(
                    name.replace('UK:', '[COLOR blue]UK:[/COLOR]').replace(
                        'USA/CA:', '[COLOR blue]USA/CA:[/COLOR]').replace(
                            'All', '[COLOR blue]A[/COLOR]ll').replace(
                                'International',
                                '[COLOR blue]Int[/COLOR]ertaional').replace(
                                    'Live:', '[COLOR blue]Live:[/COLOR]').
                    replace('TEST', '[COLOR blue]TEST[/COLOR]').replace(
                        'Install', '[COLOR blue]Install[/COLOR]').replace(
                            '24/7', '[COLOR blue]24/7[/COLOR]').replace(
                                'INT:', '[COLOR blue]INT:[/COLOR]').replace(
                                    'DE:', '[COLOR blue]DE:[/COLOR]').replace(
                                        'FR:', '[COLOR blue]FR:[/COLOR]').
                    replace('PL:', '[COLOR blue]PL:[/COLOR]').replace(
                        'AR:', '[COLOR blue]AR:[/COLOR]').replace(
                            'LIVE:', '[COLOR blue]LIVE:[/COLOR]').replace(
                                'ES:', '[COLOR blue]ES:[/COLOR]').replace(
                                    'IN:', '[COLOR blue]IN:[/COLOR]').replace(
                                        'PK:', '[COLOR blue]PK:[/COLOR]'),
                    play_url + url + '.ts', 4, thumb, fanart, '')
Example #29
0
def football():
    import re
    url = 'http://www.wheresthematch.com/live-football-on-tv/'
    open = tools.OPEN_URL(url)
    all_lists = tools.regex_get_all(open, '<td class="home-team">', '</tr>')
    tools.addDir(
        '[COLOR lime]Only Shows Main Matches - Find More at http://liveonsat.com[/COLOR]',
        'url', 500, icon, fanart, '')
    for a in all_lists:
        name = re.compile(
            '<em class="">(.*?)<em class="">(.*?)</em>.*?<em class="">(.*?)</em>',
            re.DOTALL).findall(a)
        for home, v, away in name:
            koff = tools.regex_from_to(a, '<strong>', '</strong>')
            chan = tools.regex_from_to(a, 'class="channel-name">', '</span>')
            if chan == "Live Stream":
                chan = 'Check liveonsat.com'
            if chan == 'LFC TV':
                chan = 'LFCTV'
            if 'Bet 365 Live' not in chan:
                tools.addDir(
                    koff + ' - ' + str(home).replace('</em>', '') + ' ' + v +
                    '  ' + away + '   -   [COLOR lime]%s[/COLOR]' % chan,
                    'url', 18, icon, fanart, chan)
Example #30
0
def Livelist(url):
    open = tools.OPEN_URL(url)
    all_cats = tools.regex_get_all(open, '<channel>', '</channel>')
    for a in all_cats:
        name = tools.regex_from_to(a, '<title>', '</title>')
        name = base64.b64decode(name)
        xbmc.log(str(name))
        name = re.sub('\[.*?min ', '-', name)
        thumb = tools.regex_from_to(a,
                                    '<desc_image>', '</desc_image>').replace(
                                        '<![CDATA[', '').replace(']]>', '')
        url1 = tools.regex_from_to(a, '<stream_url>', '</stream_url>').replace(
            '<![CDATA[', '').replace(']]>', '')
        desc = tools.regex_from_to(a, '<description>', '</description>')
        tools.addDir(
            name.replace('UK:', '[COLOR blue]UK:[/COLOR]').replace(
                'USA/CA:', '[COLOR blue]USA/CA:[/COLOR]').replace(
                    'All', '[COLOR blue]A[/COLOR]ll').replace(
                        'International',
                        '[COLOR blue]Int[/COLOR]ertaional').replace(
                            'Live:', '[COLOR blue]Live:[/COLOR]').replace(
                                'TEST', '[COLOR blue]TEST[/COLOR]').replace(
                                    'Install',
                                    '[COLOR blue]Install[/COLOR]').replace(
                                        '24/7', '[COLOR blue]24/7[/COLOR]').
            replace('INT:', '[COLOR blue]INT:[/COLOR]').replace(
                'DE:', '[COLOR blue]DE:[/COLOR]').replace(
                    'FR:', '[COLOR blue]FR:[/COLOR]').replace(
                        'PL:', '[COLOR blue]PL:[/COLOR]').replace(
                            'AR:', '[COLOR blue]AR:[/COLOR]').replace(
                                'LIVE:', '[COLOR blue]LIVE:[/COLOR]').replace(
                                    'ES:', '[COLOR blue]ES:[/COLOR]').replace(
                                        'IN:',
                                        '[COLOR blue]IN:[/COLOR]').replace(
                                            'PK:', '[COLOR blue]PK:[/COLOR]'),
            url1, 4, thumb, fanart, base64.b64decode(desc))