PK QUF;< < plugin.video.macvod/addon.xml
.+?
(.+?).+?(.+?)
\n\n(.+?)<.*?URL.*?value="(.+?)"', url, re.DOTALL)
for title, url in matches:
plugintools . add_item ( action = "fluxus1" , title = title, url = url , thumbnail = "https://koditips.com/wp-content/uploads/fluxus-tv-kodi.png", fanart="", folder = True )
def fluxus1 (params):
thumbnail = params.get("thumbnail")
plugintools.log("macvod.fluxus1")
url3 = params.get("url")
request_headers=[]
request_headers.append(["User-Agent","Mozilla/5.0 (Windows NT 10.0; rv:75.0) Gecko/20100101 Firefox/75.0"])
body,response_headers = plugintools.read_body_and_headers( url3, headers=request_headers)
url = body.strip().decode('utf-8')
matches = re.findall(r'(?s)#EXTINF:-1.*?logo="(.+?)".*?,(.+?)\n.*?(.+?)\s', url, re.DOTALL)
for thumb, title, url in matches:
plugintools . add_item ( action = "resolve_without_resolveurl" , title = title , url = url , thumbnail = thumb, fanart="", folder = False , isPlayable = True )
def sphinx (params):
thumbnail = params.get("thumbnail")
plugintools.log("macvod.sphinx")
url3 = params.get("url")
request_headers=[]
request_headers.append(["User-Agent","Mozilla/5.0 (Windows NT 10.0; rv:75.0) Gecko/20100101 Firefox/75.0"])
body,response_headers = plugintools.read_body_and_headers( url3, headers=request_headers)
url = body.strip().decode('utf-8')
matches = re.findall(r'(?s)"url": "(.+?)".+?"image": "(.+?)".+?name": "(.+?)"', url, re.DOTALL)
for url, thumb, title in matches:
plugintools . add_item ( action = "sphinxm3u" , title = title, url = url , thumbnail = thumb, fanart="", folder = True )
def sphinxm3u(params):
plugintools.log("macvod.sphinxm3u")
thumbnail = params.get("thumbnail")
url3 = params.get("url")
request_headers=[]
request_headers.append(["User-Agent","Mozilla/5.0 (Windows NT 10.0; rv:75.0) Gecko/20100101 Firefox/75.0"])
body,response_headers = plugintools.read_body_and_headers( url3, headers=request_headers)
url = body.strip().decode('utf-8')
matches = plugintools.find_multiple_matches(url,'(#EXTINF:.+?,.*?[\n\r]+[^\n]+)')
for generos in matches:
patron=plugintools.find_single_match(generos,'(?s)#EXTINF:.+?,(.*?)[\n\r]+([^\n]+)')
url=patron[1]
titulo=patron[0]
plugintools.add_item(action="resolve_without_resolveurl", url=url,title="[LOWERCASE][CAPITALIZE][COLOR orange]"+titulo+" [/CAPITALIZE][/LOWERCASE][/COLOR]",thumbnail=thumbnail,fanart=thumbnail,folder=False, isPlayable = True )
def listamd(params):
plugintools.log("macvod.listamd")
thumbnail = params.get("thumbnail")
url3 = params.get("url")
request_headers=[]
request_headers.append(["User-Agent","Mozilla/5.0 (Windows NT 10.0; rv:75.0) Gecko/20100101 Firefox/75.0"])
body,response_headers = plugintools.read_body_and_headers( url3, headers=request_headers)
url = body.strip().decode('utf-8')
url4 = "https://token.stb.md/api/Flussonic/stream/NICKELODEON_H264/metadata.json"
request_headers=[]
request_headers.append(["User-Agent","Mozilla/5.0 (Windows NT 10.0; rv:75.0) Gecko/20100101 Firefox/75.0"])
body,response_headers = plugintools.read_body_and_headers( url4, headers=request_headers)
url5 = body.strip().decode('utf-8')
token = plugintools.find_single_match(url5,'(?s)token\=(.+?)"')
matches = plugintools.find_multiple_matches(url,'(logo=".+?".+?\,.+?\nhttp.+?token\=)')
for generos in matches:
patron=plugintools.find_single_match(generos,'(?s)logo="(.+?)".+?\,(.+?)\n(http.+?token\=)')
url=patron[2]
url=url+token
titulo=patron[1]
thumb=patron[0]
plugintools.add_item(action="resolve_without_resolveurl", url=url,title="[LOWERCASE][CAPITALIZE][COLOR orange]"+titulo+" [/CAPITALIZE][/LOWERCASE][/COLOR]",thumbnail=thumb,fanart=thumbnail,folder=False, isPlayable = True )
def resolve_without_resolveurl ( params ) :
import resolveurl
url = (params.get ( "url" ))
finalurl = url.encode("utf-8", "strict")
plugintools.play_resolved_url ( finalurl )
def resolve_resolveurl_youtube ( params ) :
import resolveurl
finalurl = resolveurl . resolve ( "https://www.youtube.com/watch?v=" + params . get ( "url" ) )
plugintools . play_resolved_url ( finalurl )
#code macpastebin
#code macpastebin
def ver_canales(params):
thumbnail = params.get("thumbnail")
mac=myaddon.getSetting('mac2')
portal=myaddon.getSetting('portal2')
escogido=myaddon.getSetting('escogido')
s=''
usuario = ''
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0","cookie": "mac="+mac+"; stb_lang=es; timezone=Europe/spain"}
url=portal+'portal.php?type=stb&action=handshake&JsHttpRequest=1-xml'
source=''
try:
source = requests.Session()
source=requests.get(url, headers=headers).content
except:
xbmc.executebuiltin('XBMC.Notification( Nu se poate conecta la SERVER: ' + escogido +', '+portal+' '+mac+ ', 8000)')
if source =='':
xbmc.executebuiltin('XBMC.Notification( Nu se poate conecta la SERVER: ' + escogido +', '+str(source)+ ', 8000)')
#xbmc.log('ERROR conectando al servidor: '+str(source)+' : '+str(url))
#xbmc.executebuiltin('Action(Back)')
#return(params)
token=''
try:
token=re.findall('token":"(.*?)"', str(source) )[0]
except:
xbmc.executebuiltin('XBMC.Notification( Nu se poate conecta la SERVER: ' + escogido +', '+str(source)+ ', 8000)')
#xbmc.executebuiltin('Action(Back)')
#return(params)
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0","cookie": "mac="+str(mac)+"; stb_lang=es; timezone=Europe/spain","Authorization": "Bearer "+token}
url=portal+'portal.php?type=stb&action=get_profile&JsHttpRequest=1-xml'
source=""
usuario=''
source = requests.Session()
source=requests.get(url, headers=headers).content
try:
passs=re.findall('login":"","password":"(.*?)"',source )[0]
typee=re.findall('"stb_type":"(.*?)"',str(source) )[0]
except:
passs=''
usuario=''
typee=''
payload={"login":usuario,"password":passs,"stb_type":typee}
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0","cookie": "mac="+mac+"; stb_lang=es; timezone=Europe/spain","Authorization": "Bearer "+token}
url=portal+'portal.php?type=itv&action=get_genres&JsHttpRequest=1-xml'
source=''
s = requests.Session()
source=s.post(url, headers=headers,data=str(payload)).text
if source!='':
data = plugintools.find_multiple_matches(source,'("id":"\d+.*?".*?"title":".*?",")')
pr0n=myaddon.getSetting('pr0n')
plugintools.add_item(title='[COLOR gray]-=========================-[/COLOR]',folder=False, isPlayable=False)
plugintools.add_item(title='[COLOR blue]ACTUAL [ '+escogido+' # '+mac+' ][/COLOR]',folder=False, isPlayable=False)
plugintools.add_item(title='[COLOR gray]-=========================-[/COLOR]',folder=False, isPlayable=False)
for generos in data:
patron=plugintools.find_single_match(generos,'"id":"(\d+.*?)".*?"title":"(.*?)"')
titulo=patron[1]
ids=patron[0]
tit=colorea(titulo)
if not('adult' in titulo.lower() and pr0n=="false"):
#plugintools.add_item(action="paginar_canales", title=tit, thumbnail = params.get("thumbnail"), fanart= params.get("thumbnail"),plot=token,page=mac,extra=portal,url=ids,folder=True)
plugintools.add_item(action="lista2", title=tit, thumbnail = params.get("thumbnail"), fanart= params.get("thumbnail"),plot=token,page=mac,extra=portal,url=ids,folder=True)
else:
xbmc.executebuiltin('XBMC.Notification([COLOR red]Problema '+'[COLOR orange]'+escogido+'[/COLOR],[COLOR orange]'+portal+' '+mac+'[/COLOR], 10000)')
def cambio_servidor(params):
server2=myaddon.getSetting('ser')
escogido=myaddon.getSetting('escogido')
userp=myaddon.getSetting('userp')
portal= myaddon.getSetting('portal2')
mac= myaddon.getSetting('mac2')
dialog = xbmcgui.Dialog()
#lists=myaddon.getSetting('lista').split(',')
#lista_servidores=myaddon.getSetting('lista_servidores').split(',')
listaservere = urlopen(Request("https://pastebin.com/u/"+userp)).read().decode('utf-8')
lists = re.findall('(?s)data-key=".+?".+?href="/(.+?)".+?(.+?)<.+?-1:
#xbmc.executebuiltin('XBMC.Notification(Lista,'+lista_servidores[retorno]+',8000)')
dialog = xbmcgui.Dialog()
if str(retorno)!='-1':
server2=lists[retorno]
escogido=lista_servidores[retorno]
if 1==1: #try:
mac1 = urlopen(Request("https://pastebin.com/raw/"+server2)).read().decode('utf-8')
mac=""
mac=re.findall('(00:.*?79:.*?........)', mac1)
portal=re.findall('portal"(.*?)"', mac1.lower())[0]
maclista=''
random.seed()
while maclista == '' or not maclista:
maclista = random.choice(mac)
mac=maclista
myaddon.setSetting('mac2',mac)
myaddon.setSetting('portal2',portal)
myaddon.setSetting('ser',server2)
myaddon.setSetting('escogido',escogido)
else:
#except:
xbmc.executebuiltin('XBMC.Notification( Eroare la deschiderea: ' + str(escogido) +', '+str(portal)+' '+str(mac)+ ', 8000)')
xbmc.executebuiltin('Action(Back)')
else:
xbmc.executebuiltin('Action(Back)')
xbmc.executebuiltin('Content.refresh')
ver_canales(params)
def cambio_mac(params):
try:
server2 = myaddon.getSetting('ser')
macant= myaddon.getSetting('mac2')
escogido= myaddon.getSetting('escogido')
except:
server2='pfducjrm'
if escogido=='Fisier_LOCAL':
xbmc.executebuiltin('XBMC.Notification(Fisier local, Fisierul LOCAL functioneaza cu un singur MAC. Daca doresti sa schimbi MAC-ul adauga o noua linie in fisierul local. , 8000)')
xbmc.executebuiltin('Content.Refresh')
xbmc.executebuiltin('Action(Back)')
else:
try:
mac1 = urlopen(Request("https://pastebin.com/raw/"+server2)).read().decode('utf-8')
mac=""
mac=re.findall('(00:.*?79:.*?........)', mac1)
portal=re.findall('portal"(.*?)"', mac1.lower())[0]
dialog = xbmcgui.Dialog()
ret = dialog.select('MAC ACTUAL: [ '+str(escogido)+' # '+str(macant)+' ]', ['Schimba MAC', 'Continua cu MAC '+macant])
lists = ['si','no']
categorias= lists[ret]
if 'si' in categorias:
newmac=''
selectable="Alege un MAC Random"
for mc in mac:
selectable=selectable+','+str(mc)
lista_macs=selectable.split(",")
ret=dialog.select('Alege un MAC:',lista_macs)
if ret==1:
random.seed()
while newmac == '' or not newmac:
newmac = random.choice(mac)
else:
if ret==-1:
newmac=macant
else:
newmac=mac[ret-1]
if newmac!=macant:
myaddon.setSetting('mac2',newmac)
xbmc.executebuiltin('XBMC.Notification( MAC nou, ' +newmac+ ', 8000)')
except:
xbmc.executebuiltin('XBMC.Notification( Eroare MAC nou, Se continua cu' +macant+ ', 8000)')
xbmc.executebuiltin('Action(Back)')
xbmc.executebuiltin('Content.refresh')
ver_canales(params)
def colorea(titulo):
if 'Romania' in titulo.lower() or 'rom' in titulo.lower() or 'EU -RO' in titulo or 'romanian' in titulo.lower() or 'EU- RO' in titulo:
color='darkorange'
else:
if 'crimexxx' in titulo.lower():
color='springgreen'
else:
if 'axnxxxxxx' in titulo.lower() or 'accionxxxxxxx' in titulo.lower() or 'estrenosxxxxx' in titulo.lower() or 'historiaxxxxxxx' in titulo.lower() or 'odiseaxxxxxxxx' in titulo.lower() or 'discoveryxxxxxxx' in titulo.lower():
color='deeppink'
else:
if 'adult' in titulo.lower() or 'xxx' in titulo.lower() or 'porn' in titulo.lower():
color='red'
else:
color='mintcream'
return '[COLOR '+color+']'+titulo+'[/COLOR]'
def tulista(params):
dhoy=date.today()
text_today = dhoy.strftime("%Y%m%d")
hoy=int(text_today)
try:
mac=myaddon.getSetting('cam')
server=myaddon.getSetting('revres')
portal=myaddon.getSetting('latrop')
userp=myaddon.getSetting('userp')
nat=int(myaddon.getSetting('nat'))
fec_texto=myaddon.getSetting('fec')
fec=int(fec_texto)
except:
nat=10
mac=''
server=''
portal=''
myaddon.setSetting('cam',mac)
myaddon.setSetting('revres',server)
myaddon.setSetting('latrop',portal)
myaddon.setSetting('nat',str(nat))
myaddon.setSetting('fec',text_today)
fec = hoy
if fec < hoy:
nat=10
maximo=False
if nat<=0:
xbmcgui.Dialog().ok('MAXIMUM number of lists reached ', 'You have reached the maximum number of lists to use today. You have to wait until tomorrow to be able to use the list again. We leave you with your last list for today ')
maximo=True
#xbmc.executebuiltin('Action(Back)')
#return
#Guardo el nº de veces = nº de veces-1 y guardo la fecha actual
if fec==hoy and maximo==False:
dialog = xbmcgui.Dialog()
ret = dialog.select('Selecciona opcion', ['[COLOR red]CREATE NEW LIST [/COLOR] [ You have left [COLOR green]'+str(nat)+'[/COLOR] attempt ]', '[COLOR white]Continue with TODAY list[/COLOR]'])
#ret = dialog.select('Selecciona opcion', ['[COLOR red]CREAR LISTA NUEVA[/COLOR]', '[COLOR white]Seguir com mi lista de HOY[/COLOR]'])
else:
if maximo==False:
ret=0
else:
ret=1
if ret==0:
#Lista de Servidores desde pastebin
#serv = urlopen(Request("https://pastebin.com/raw/a38wUnQf")).read().decode('utf-8')
listaservere = urlopen(Request("https://pastebin.com/u/"+userp)).read().decode('utf-8')
serv = re.findall('(?s)data-key=".+?".+?href="/(.+?)".+?')[0]
xbmc.log('URLX: ' +str(urlx))
matches = plugintools.find_multiple_matches(urlx,'