Ejemplo n.º 1
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))
Ejemplo n.º 2
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.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)
Ejemplo n.º 3
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),
        )
Ejemplo n.º 4
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, '')
Ejemplo n.º 5
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)
Ejemplo n.º 6
0
def accountinfo():
    open = tools.OPEN_URL(panel_api)
    try:
        username = tools.regex_from_to(open, '"username":"******"')
        status = tools.regex_from_to(open, '"status":"', '"')
        connects = tools.regex_from_to(open, '"max_connections":"', '"')
        active = tools.regex_from_to(open, '"active_cons":"', '"')
        expiry = tools.regex_from_to(open, '"exp_date":"', '"')
        expiry = datetime.datetime.fromtimestamp(
            int(expiry)).strftime('%d/%m/%Y - %H:%M')
        expreg = re.compile('^(.*?)/(.*?)/(.*?)$', re.DOTALL).findall(expiry)
        for day, month, year in expreg:
            month = tools.MonthNumToName(month)
            year = re.sub(' -.*?$', '', year)
            expiry = month + ' ' + day + ' - ' + year
            ip = tools.getlocalip()
            extip = tools.getexternalip()
            tools.addDir('[COLOR purple]Username :[/COLOR] ' + username, '',
                         '', icon, fanart, '')
            tools.addDir('[COLOR purple]Expiry Date:[/COLOR] ' + expiry, '',
                         '', icon, fanart, '')
            tools.addDir('[COLOR purple]Account Status :[/COLOR] %s' % status,
                         '', '', icon, fanart, '')
            tools.addDir(
                '[COLOR purple]Current Connections:[/COLOR] ' + active, '', '',
                icon, fanart, '')
            tools.addDir(
                '[COLOR purple]Allowed Connections:[/COLOR] ' + connects, '',
                '', icon, fanart, '')
            tools.addDir('[COLOR purple]Local IP Address:[/COLOR] ' + ip, '',
                         '', icon, fanart, '')
            tools.addDir('[COLOR purple]External IP Address:[/COLOR] ' + extip,
                         '', '', icon, fanart, '')
    except:
        pass
Ejemplo n.º 7
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, '')
Ejemplo n.º 8
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,'')
Ejemplo n.º 9
0
def tinyurlGet(m3u, epg):
    request = 'https://tinyurl.com/create.php?source=indexpage&url=' + m3u + '&submit=Make+TinyURL%21&alias='
    request2 = 'https://tinyurl.com/create.php?source=indexpage&url=' + epg + '&submit=Make+TinyURL%21&alias='
    m3u = tools.OPEN_URL(request)
    epg = tools.OPEN_URL(request2)
    shortm3u = tools.regex_from_to(m3u, '<div class="indent"><b>', '</b>')
    shortepg = tools.regex_from_to(epg, '<div class="indent"><b>', '</b>')
    return shortm3u, shortepg
Ejemplo n.º 10
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,'')
Ejemplo n.º 11
0
def GETAUTOPLAY(url):
    #progressDialog = xbmcgui.DialogProgress()
    #progressDialog.create(addon_name, 'Gathering Links For Your Selected Item: [COLOR blue]%s[/COLOR]'%name)
    #progressDialog.update(0)
    base_link = 'http://watch5s.is'
    strm_link = 'http://play.watch5s.is/grabber-api/episode/%s?token=%s'
    url = re.sub('/$', '', url)
    req = url + '/watch/'
    #Text_Box('h',req)
    referer = req
    r = client.request(req)

    if '<title>Watch Free Movies Online, Best Site to Watch Free Movies HD - WATCH5S.TO</title>' in r:
        r = client.request(url)
        part = tools.regex_from_to(r, '<div id="mv-info">', '</div>')
        url = tools.regex_from_to(part, 'href="', '"')
        r = client.request(url)
    try:
        server = tools.regex_from_to(r, '<strong>SERVER 1</strong>', '</a>')
        server = tools.regex_from_to(server, 'href="', '"')
    except:
        try:
            server = tools.regex_from_to(r, '<strong>SERVER 10</strong>',
                                         '</a>')
            server = tools.regex_from_to(server, 'href="', '"')
        except:
            server = tools.regex_from_to(r, '<strong>OpenLoad</strong>',
                                         '</a>')
            server = tools.regex_from_to(server, 'href="', '"')

    open = client.request(server)
    t = re.findall('player_type\s*:\s*"(.+?)"', open)[0]
    if not t == 'embed':

        s = client.parseDOM(open,
                            'input',
                            ret='value',
                            attrs={'name': 'episodeID'})[0]
        t = ''.join(
            random.sample(
                string.digits + string.ascii_uppercase +
                string.ascii_lowercase, 8))
        k = hashlib.md5('!@#$%^&*(' + s + t).hexdigest()
        v = hashlib.md5(t + referer + s).hexdigest()

        stream = strm_link % (s, t)
        cookie = '%s=%s' % (k, v)

        u = client.request(stream,
                           referer=referer,
                           cookie=cookie,
                           timeout='10')
        url = tools.regex_from_to(u, '"file":"', '"').replace('\/', '/')
        if not 'grabber-api' in url:
            return url
    else:
        url = tools.regex_from_to(open, 'embed_src: "', '"')
        return url
Ejemplo n.º 12
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,'')
Ejemplo n.º 13
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)
Ejemplo n.º 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':
Ejemplo n.º 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,'')
Ejemplo n.º 16
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,'')
Ejemplo n.º 17
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,'')
Ejemplo n.º 18
0
def Get():
    m3u = 'http%3A%2F%2Fmediahubiptv.ddns.net%3A4545%2Fget.php%3Fusername%3D' + username + '%26password%3D' + password + '%26type%3Dm3u_plus%26output%3Dts'
    epg = 'http%3A%2F%2Fmediahubiptv.ddns.net%3A4545%2Fxmltv.php%3Fusername%3D' + username + '%26password%3D' + password
    auth = 'http://mediahubiptv.ddns.net:4545/enigma2.php?username='******'&password='******'&type=get_vod_categories'
    auth = tools.OPEN_URL(auth)
    if not auth == "":
        request = 'https://tinyurl.com/create.php?source=indexpage&url=' + m3u + '&submit=Make+TinyURL%21&alias='
        request2 = 'https://tinyurl.com/create.php?source=indexpage&url=' + epg + '&submit=Make+TinyURL%21&alias='
        m3u = tools.OPEN_URL(request)
        epg = tools.OPEN_URL(request2)
        shortm3u = tools.regex_from_to(m3u, '<div class="indent"><b>', '</b>')
        shortepg = tools.regex_from_to(epg, '<div class="indent"><b>', '</b>')
        return shortm3u, shortepg
Ejemplo n.º 19
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, '')
Ejemplo n.º 20
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,'')
Ejemplo n.º 21
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))
Ejemplo n.º 22
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,'')
Ejemplo n.º 23
0
def Get():
	xbmc.executebuiltin("ActivateWindow(busydialog)")
	m3u  = userinfo.host+':'+userinfo.port+'/get.php%3Fusername%3D'+username+'%26password%3D'+password+'%26type%3Dm3u_plus%26output%3Dts'
	epg  = userinfo.host+':'+userinfo.port+'/xmltv.php%3Fusername%3D'+username+'%26password%3D'+password
	auth = userinfo.host+':'+userinfo.port+'/enigma2.php?username='******'&password='******'&type=get_vod_categories'
	auth = tools.OPEN_URL(auth)
	if not auth=="":
		request  = 'https://tinyurl.com/create.php?source=indexpage&url='+m3u+'&submit=Make+TinyURL%21&alias='
		xbmc.log(str(request))
		request2 = 'https://tinyurl.com/create.php?source=indexpage&url='+epg+'&submit=Make+TinyURL%21&alias='
		m3u = tools.OPEN_URL(request)
		epg = tools.OPEN_URL(request2)
		xbmc.log(str(epg))
		shortm3u = tools.regex_from_to(m3u,'<div class="indent"><b>','</b>')
		shortepg = tools.regex_from_to(epg,'<div class="indent"><b>','</b>')
		xbmc.executebuiltin("Dialog.Close(busydialog)")
		xbmcgui.Dialog().ok(userinfo.addon_name,'[COLOR blue]M3U URL: [/COLOR]%s'%shortm3u,'','[COLOR blue]EPG URL: [/COLOR]%s'%shortepg)
	else:
		return
Ejemplo n.º 24
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,
                             '')
Ejemplo n.º 25
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
Ejemplo n.º 26
0
def Get():
	xbmc.executebuiltin("ActivateWindow(busydialog)")
	m3u  = 'http://extratime.hopto.me:80/get.php?username='******'&password='******'&type=m3u_plus&output=ts'
	epg  = 'http://extratime.hopto.me:80/xmltv.php?username='******'&password='******'http://extratime.hopto.me:80/enigma2.php?username='******'&password='******'&type=get_vod_categories'
	auth = tools.OPEN_URL(auth)
	if not auth=="":
		request  = 'https://tinyurl.com/create.php?source=indexpage&url='+m3u+'&submit=Make+TinyURL%21&alias='
		xbmc.log(str(request))
		request2 = 'https://tinyurl.com/create.php?source=indexpage&url='+epg+'&submit=Make+TinyURL%21&alias='
		m3u = tools.OPEN_URL(request)
		epg = tools.OPEN_URL(request2)
		xbmc.log(str(epg))
		shortm3u = tools.regex_from_to(m3u,'<div class="indent"><b>','</b>')
		shortepg = tools.regex_from_to(epg,'<div class="indent"><b>','</b>')
		xbmc.executebuiltin("Dialog.Close(busydialog)")
		xbmcgui.Dialog().ok('Limitless IPTV','[COLOR blue]M3U URL: [/COLOR]%s'%shortm3u,'','[COLOR blue]EPG URL: [/COLOR]%s'%shortepg)
	else:
		return
Ejemplo n.º 27
0
def startupd():
    try:
        from datetime import date

        open = tools.OPEN_URL(panel_api)

        username = tools.regex_from_to(open, '"username":"******"')
        status = tools.regex_from_to(open, '"status":"', '"')
        expiry = tools.regex_from_to(open, '"exp_date":"', '"')
        if status == 'Expired':
            xbmcgui.Dialog().ok(
                user.name,
                'Hello There, %s. Your Account has Expired!' % username)
            return ""
        expiry = datetime.datetime.fromtimestamp(
            int(expiry)).strftime('%d/%m/%Y')
        expreg = re.compile('^(.*?)/(.*?)/(.*?)$', re.DOTALL).findall(expiry)

        for day, month, year in expreg:
            d0 = date(int(year), int(month), int(day))

        times = time.time()
        times = datetime.datetime.fromtimestamp(
            int(times)).strftime('%d/%m/%Y')
        times = re.compile('^(.*?)/(.*?)/(.*?)$', re.DOTALL).findall(times)

        for day, month, year in times:
            d1 = date(int(year), int(month), int(day))

        delta = d0 - d1
        days = delta.days

        if int(days) < 5:
            xbmcgui.Dialog().notification(
                user.name,
                'Just a Reminder, You Have %s Days Left On Your Account' %
                days,
                icon=icon)

        return "True"
    except:
        pass
Ejemplo n.º 28
0
def accountinfo():
    open = tools.OPEN_URL(panel_api)
    try:
        username = tools.regex_from_to(open, '"username":"******"')
        password = tools.regex_from_to(open, '"password":"******"')
        status = tools.regex_from_to(open, '"status":"', '"')
        connects = tools.regex_from_to(open, '"max_connections":"', '"')
        active = tools.regex_from_to(open, '"active_cons":"', '"')
        expiry = tools.regex_from_to(open, '"exp_date":"', '"')
        expiry = datetime.datetime.fromtimestamp(
            int(expiry)).strftime('%d/%m/%Y - %H:%M')
        ip = tools.getlocalip()
        extip = tools.getexternalip()
        tools.addDir('[COLOR blue]Username :[/COLOR] ' + username, '', '',
                     icon, fanart, '')
        tools.addDir('[COLOR blue]Password :[/COLOR] ' + password, '', '',
                     icon, fanart, '')
        tools.addDir('[COLOR blue]Expiry Date:[/COLOR] ' + expiry, '', '',
                     icon, fanart, '')
        tools.addDir('[COLOR blue]Account Status :[/COLOR] %s' % status, '',
                     '', icon, fanart, '')
        tools.addDir('[COLOR blue]Current Connections:[/COLOR] ' + active, '',
                     '', icon, fanart, '')
        tools.addDir('[COLOR blue]Allowed Connections:[/COLOR] ' + connects,
                     '', '', icon, fanart, '')
        tools.addDir('[COLOR blue]Local IP Address:[/COLOR] ' + ip, '', '',
                     icon, fanart, '')
        tools.addDir('[COLOR blue]External IP Address:[/COLOR] ' + extip, '',
                     '', icon, fanart, '')
    except:
        pass
Ejemplo n.º 29
0
def accountinfo():
		open = tools.OPEN_URL(panel_api)
		username   = tools.regex_from_to(open,'"username":"******"')
		password   = tools.regex_from_to(open,'"password":"******"')
		status     = tools.regex_from_to(open,'"status":"','"')
		connects   = tools.regex_from_to(open,'"max_connections":"','"')
		active     = tools.regex_from_to(open,'"active_cons":"','"')
		expiry     = tools.regex_from_to(open,'"exp_date":"','"')
		if not expiry=="":
			expiry     = datetime.datetime.fromtimestamp(int(expiry)).strftime('%d/%m/%Y - %H:%M')
			expreg     = re.compile('^(.*?)/(.*?)/(.*?)$',re.DOTALL).findall(expiry)
			for day,month,year in expreg:
				month     = tools.MonthNumToName(month)
				year      = re.sub(' -.*?$','',year)
				expiry    = month+' '+day+' - '+year
		else:
			expiry = 'Unlimited'
			
		ip        = tools.getlocalip()
		tools.addDir('[B][COLOR white]Username :[/COLOR][/B] '+username,'','',icon,fanart,'')
		tools.addDir('[B][COLOR white]Password :[/COLOR][/B] '+password,'','',icon,fanart,'')
		tools.addDir('[B][COLOR white]Expiry Date:[/COLOR][/B] '+expiry,'','',icon,fanart,'')
		tools.addDir('[B][COLOR white]Account Status :[/COLOR][/B] %s'%status,'','',icon,fanart,'')
		tools.addDir('[B][COLOR white]Current Connections:[/COLOR][/B] '+ active,'','',icon,fanart,'')
		tools.addDir('[B][COLOR white]Allowed Connections:[/COLOR][/B] '+connects,'','',icon,fanart,'')
		tools.addDir('[B][COLOR white]Local IP Address:[/COLOR][/B] '+ip,'','',icon,fanart,'')
		tools.addDir('[B][COLOR white]Kodi Version:[/COLOR][/B] '+str(KODIV),'','',icon,fanart,'')
Ejemplo n.º 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))
        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))