def footballguide(): 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 blue]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' 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', 9999915, 'http://www.wheresthematch.com' + str(thumb).replace('..', ''), fanart, chan)
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: 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 ffff0000][B]UK:[/COLOR][/B]').replace( 'USA/CA:', '[COLOR ffff0000][B]USA/CA:[/COLOR][/B]').replace( 'All', '[COLOR ffff0000][B]All[/COLOR][/B]'). replace( 'International Sport', '[COLOR ffff0000][B]INT: [/COLOR][/B]International Sport' ).replace('Live:', '[COLOR ffff0000][B]Live:[/COLOR][/B]').replace( 'TEST', '[COLOR ffff0000][B]TEST[/COLOR][/B]'). replace( 'Install', '[COLOR ffff0000][B]Install[/COLOR][/B]').replace( '24/7', '[COLOR ffff0000][B]24/7: [/COLOR][/B]Channels'). replace( 'DE:', '[COLOR ffff0000][B]DE:[/COLOR][/B]').replace( 'FR:', '[COLOR ffff0000][B]FR:[/COLOR][/B]').replace( 'PL:', '[COLOR ffff0000][B]PL:[/COLOR][/B]').replace( 'AR:', '[COLOR ffff0000][B]AR:[/COLOR][/B]'). replace( 'LIVE:', '[COLOR ffff0000][B]LIVE:[/COLOR][/B]').replace( 'ES:', '[COLOR ffff0000][B]ES:[/COLOR][/B]').replace( 'IN:', '[COLOR ffff0000][B]IN:[/COLOR][/B]').replace( 'PK:', '[COLOR ffff0000][B]PK:[/COLOR][/B]'). replace( 'NBC Extra Time', '[COLOR ffff0000][B]NBC:[/COLOR][/B] NBC Extra Time'), play_url + url + '.ts', 999994, thumb, fanart, '')
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":"','"').replace('\/','/') thumb= tools.regex_from_to(a,'"stream_icon":"','"').replace('\/','/') id = tools.regex_from_to(a,'stream_id":"','"') if not name=="": name = name.replace('ENT:','[B]ENT:[/B]').replace('KID:','[B]KID:[/B]').replace('MOV:','[B]MOV:[/B]').replace('DOC:','[B]DOC:[/B]').replace('SSS:','[B]SSS:[/B]').replace('BTS:','[B]BTS:[/B]').replace('UKS:','[B]UKS:[/B]') tools.addDir(name,'url',9999913,thumb,fanart,id)
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>') tools.addDir(name.replace('UK:','[COLOR white][B]UK:[/COLOR][/B]').replace('USA/CA:','[COLOR white][B]USA/CA:[/COLOR][/B]').replace('All','[COLOR white][B]A[/COLOR][/B]ll').replace('International','[COLOR white][B]Int[/COLOR][/B]ertaional').replace('Live:','[COLOR white][B]Live:[/COLOR][/B]').replace('TEST','[COLOR white][B]TEST[/COLOR][/B]').replace('Install','[COLOR white][B]Install[/COLOR][/B]').replace('24/7','[COLOR white][B]24/7[/COLOR][/B]').replace('INT:','[COLOR white][B]INT:[/COLOR][/B]').replace('DE:','[COLOR white][B]DE:[/COLOR][/B]').replace('FR:','[COLOR white][B]FR:[/COLOR][/B]').replace('PL:','[COLOR white][B]PL:[/COLOR][/B]').replace('AR:','[COLOR white][B]AR:[/COLOR][/B]').replace('LIVE:','[COLOR white][B]LIVE:[/COLOR][/B]').replace('ES:','[COLOR white][B]ES:[/COLOR][/B]').replace('IN:','[COLOR white][B]IN:[/COLOR][/B]').replace('PK:','[COLOR white][B]PK:[/COLOR][/B]'),url1,999994,thumb,fanart,base64.b64decode(desc))
def search(): text = searchdialog() if not text: xbmc.executebuiltin("XBMC.Notification([COLOR white][B]Search is Empty[/B][/COLOR][/B],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',999994,thumb,fanart,'') elif text not in name.lower() and text in name: tools.addDir(name,play_url+url+'.ts',999994,thumb,fanart,'')
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 not 'Install Videos' in name: if not 'TEST CHANNELS' in name: if not 'TEST' in name: if url == 'LIVE': if 'Live:' in name: tools.addDir(name.replace('UK:','[COLOR white][B]UK:[/COLOR][/B]').replace('USA/CA:','[COLOR white][B]USA/CA:[/COLOR][/B]').replace('All','[COLOR white][B]All[/COLOR][/B]').replace('International Sport','[COLOR white][B]INT: [/COLOR][/B]International Sport').replace('Live:','[COLOR white][B]Live:[/COLOR][/B]').replace('TEST','[COLOR white][B]TEST[/COLOR][/B]').replace('Install','[COLOR white][B]Install[/COLOR][/B]').replace('24/7','[COLOR white][B]24/7: [/COLOR][/B]Channels').replace('DE:','[COLOR white][B]DE:[/COLOR][/B]').replace('FR:','[COLOR white][B]FR:[/COLOR][/B]').replace('PL:','[COLOR white][B]PL:[/COLOR][/B]').replace('AR:','[COLOR white][B]AR:[/COLOR][/B]').replace('LIVE:','[COLOR white][B]LIVE:[/COLOR][/B]').replace('ES:','[COLOR white][B]ES:[/COLOR][/B]').replace('IN:','[COLOR white][B]IN:[/COLOR][/B]').replace('PK:','[COLOR white][B]PK:[/COLOR][/B]').replace('NBC Extra Time','[COLOR white][B]NBC:[/COLOR][/B] NBC Extra Time'),url1,999992,icon,fanart,'') else: if not 'Live:' in name: tools.addDir(name.replace('UK:','[COLOR white][B]UK:[/COLOR][/B]').replace('USA/CA:','[COLOR white][B]USA/CA:[/COLOR][/B]').replace('All','[COLOR white][B]All[/COLOR][/B]').replace('International Sport','[COLOR white][B]INT: [/COLOR][/B]International Sport').replace('Live:','[COLOR white][B]Live:[/COLOR][/B]').replace('TEST','[COLOR white][B]TEST[/COLOR][/B]').replace('Install','[COLOR white][B]Install[/COLOR][/B]').replace('24/7','[COLOR white][B]24/7: [/COLOR][/B]Channels').replace('DE:','[COLOR white][B]DE:[/COLOR][/B]').replace('FR:','[COLOR white][B]FR:[/COLOR][/B]').replace('PL:','[COLOR white][B]PL:[/COLOR][/B]').replace('AR:','[COLOR white][B]AR:[/COLOR][/B]').replace('LIVE:','[COLOR white][B]LIVE:[/COLOR][/B]').replace('ES:','[COLOR white][B]ES:[/COLOR][/B]').replace('IN:','[COLOR white][B]IN:[/COLOR][/B]').replace('PK:','[COLOR white][B]PK:[/COLOR][/B]').replace('NBC Extra Time','[COLOR white][B]NBC:[/COLOR][/B] NBC Extra Time'),url1,999992,icon,fanart,'')
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,999993,icon,fanart,'') 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,999994,thumb,fanart,plot,str(year).replace("['","").replace("']",""),str(cast).split(),ratin,runt,genre) except:pass xbmcplugin.setContent(int(sys.argv[1]), 'movies') 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,999994,thumb,fanart,base64.b64decode(desc))